Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

User.php 1009B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. namespace App\Models;
  3. // use Illuminate\Contracts\Auth\MustVerifyEmail;
  4. use Illuminate\Database\Eloquent\Factories\HasFactory;
  5. use Illuminate\Foundation\Auth\User as Authenticatable;
  6. use Illuminate\Notifications\Notifiable;
  7. class User extends Authenticatable
  8. {
  9. /** @use HasFactory<\Database\Factories\UserFactory> */
  10. use HasFactory, Notifiable;
  11. /**
  12. * The attributes that are mass assignable.
  13. *
  14. * @var list<string>
  15. */
  16. protected $fillable = [
  17. 'name',
  18. 'email',
  19. 'password',
  20. ];
  21. /**
  22. * The attributes that should be hidden for serialization.
  23. *
  24. * @var list<string>
  25. */
  26. protected $hidden = [
  27. 'password',
  28. 'remember_token',
  29. ];
  30. /**
  31. * Get the attributes that should be cast.
  32. *
  33. * @return array<string, string>
  34. */
  35. protected function casts(): array
  36. {
  37. return [
  38. 'email_verified_at' => 'datetime',
  39. 'password' => 'hashed',
  40. ];
  41. }
  42. }