User.php 867 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Contracts\Auth\MustVerifyEmail;
  4. use Spatie\Permission\Traits\HasRoles;
  5. use Illuminate\Database\Eloquent\SoftDeletes;
  6. use Illuminate\Foundation\Auth\User as Authenticatable;
  7. use Illuminate\Notifications\Notifiable;
  8. class User extends Authenticatable
  9. {
  10. use Notifiable;
  11. use HasRoles;
  12. use SoftDeletes;
  13. /**
  14. * The attributes that are mass assignable.
  15. *
  16. * @var array
  17. */
  18. protected $fillable = [
  19. 'name', 'email', 'password',
  20. ];
  21. /**
  22. * The attributes that should be hidden for arrays.
  23. *
  24. * @var array
  25. */
  26. protected $hidden = [
  27. 'password', 'remember_token',
  28. ];
  29. /**
  30. * The attributes that should be cast to native types.
  31. *
  32. * @var array
  33. */
  34. protected $casts = [
  35. 'email_verified_at' => 'datetime',
  36. ];
  37. }