暫無描述
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

User.php 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?php
  2. namespace App;
  3. use Illuminate\Contracts\Auth\MustVerifyEmail;
  4. use Illuminate\Foundation\Auth\User as Authenticatable;
  5. use Illuminate\Notifications\Notifiable;
  6. use Spatie\Permission\Traits\HasRoles;
  7. class User extends Authenticatable
  8. {
  9. use Notifiable, HasRoles;
  10. /**
  11. * The attributes that are mass assignable.
  12. *
  13. * @var array
  14. */
  15. protected $table = 'users';
  16. protected $fillable = [
  17. 'name',
  18. 'password',
  19. 'email',
  20. 'refferal_code'
  21. ];
  22. /**
  23. * The attributes that should be hidden for arrays.
  24. *
  25. * @var array
  26. */
  27. protected $hidden = [
  28. 'password',
  29. ];
  30. public $timestamps = false; //matiin created_at, updated_at
  31. /**
  32. * The attributes that should be cast to native types.
  33. *
  34. * @var array
  35. */
  36. protected $casts = [
  37. 'email_verified_at' => 'datetime',
  38. ];
  39. public function profile()
  40. {
  41. return $this->hasOne('App\Profile');
  42. }
  43. // public function petugas()
  44. // {
  45. // return $this->belongsTo('App\Model\User\PetugasUnitDonorDarahUdds', 'id', 'user_login_id');
  46. // }
  47. // public function rumah_sakit()
  48. // {
  49. // return $this->belongsTo('App\Model\User\MasterRumahSakits', 'id', 'user_login_id');
  50. // }
  51. }