Ingen beskrivning
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 1.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. ];
  21. /**
  22. * The attributes that should be hidden for arrays.
  23. *
  24. * @var array
  25. */
  26. protected $hidden = [
  27. 'password',
  28. ];
  29. public $timestamps = false; //matiin created_at, updated_at
  30. /**
  31. * The attributes that should be cast to native types.
  32. *
  33. * @var array
  34. */
  35. protected $casts = [
  36. 'email_verified_at' => 'datetime',
  37. ];
  38. public function profile()
  39. {
  40. return $this->hasOne('App\Profile');
  41. }
  42. // public function petugas()
  43. // {
  44. // return $this->belongsTo('App\Model\User\PetugasUnitDonorDarahUdds', 'id', 'user_login_id');
  45. // }
  46. // public function rumah_sakit()
  47. // {
  48. // return $this->belongsTo('App\Model\User\MasterRumahSakits', 'id', 'user_login_id');
  49. // }
  50. }