User.php 990 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. use Laravel\Sanctum\HasApiTokens;
  8. class User extends Authenticatable
  9. {
  10. use HasApiTokens, HasFactory, Notifiable;
  11. /**
  12. * The attributes that are mass assignable.
  13. *
  14. * @var array<int, string>
  15. */
  16. protected $fillable = [
  17. 'name',
  18. 'username',
  19. 'email',
  20. 'password',
  21. 'company_id',
  22. ];
  23. /**
  24. * The attributes that should be hidden for serialization.
  25. *
  26. * @var array<int, string>
  27. */
  28. protected $hidden = [
  29. 'password',
  30. 'remember_token',
  31. ];
  32. /**
  33. * The attributes that should be cast.
  34. *
  35. * @var array<string, string>
  36. */
  37. protected $casts = [
  38. 'email_verified_at' => 'datetime',
  39. 'password' => 'hashed',
  40. ];
  41. }