User.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | LARAVEL8.0 框架 [ LARAVEL ][ RXThinkCMF ]
  4. // +----------------------------------------------------------------------
  5. // | 版权所有 2017~2021 LARAVEL研发中心
  6. // +----------------------------------------------------------------------
  7. // | 官方网站: http://www.laravel.cn
  8. // +----------------------------------------------------------------------
  9. // | Author: laravel开发员 <laravel.qq.com>
  10. // +----------------------------------------------------------------------
  11. namespace App\Models;
  12. use Illuminate\Contracts\Auth\MustVerifyEmail;
  13. use Illuminate\Database\Eloquent\Factories\HasFactory;
  14. use Illuminate\Foundation\Auth\User as Authenticatable;
  15. use Illuminate\Notifications\Notifiable;
  16. class User extends Authenticatable
  17. {
  18. use HasFactory, Notifiable;
  19. /**
  20. * The attributes that are mass assignable.
  21. *
  22. * @var array
  23. */
  24. protected $fillable = [
  25. 'name',
  26. 'email',
  27. 'password',
  28. ];
  29. /**
  30. * The attributes that should be hidden for arrays.
  31. *
  32. * @var array
  33. */
  34. protected $hidden = [
  35. 'password',
  36. 'remember_token',
  37. ];
  38. /**
  39. * The attributes that should be cast to native types.
  40. *
  41. * @var array
  42. */
  43. protected $casts = [
  44. 'email_verified_at' => 'datetime',
  45. ];
  46. }