1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <?php
-
- namespace App;
-
- use Illuminate\Contracts\Auth\MustVerifyEmail;
- use Illuminate\Foundation\Auth\User as Authenticatable;
- use Illuminate\Notifications\Notifiable;
- use Spatie\Permission\Traits\HasRoles;
-
- class User extends Authenticatable
- {
- use Notifiable, HasRoles;
-
- /**
- * The attributes that are mass assignable.
- *
- * @var array
- */
- protected $table = 'users';
- protected $fillable = [
- 'name',
- 'password',
- 'email',
- 'refferal_code'
- ];
-
- /**
- * The attributes that should be hidden for arrays.
- *
- * @var array
- */
- protected $hidden = [
- 'password',
- ];
- public $timestamps = false; //matiin created_at, updated_at
- /**
- * The attributes that should be cast to native types.
- *
- * @var array
- */
- protected $casts = [
- 'email_verified_at' => 'datetime',
- ];
-
- public function profile()
- {
- return $this->hasOne('App\Profile');
- }
-
- // public function petugas()
- // {
- // return $this->belongsTo('App\Model\User\PetugasUnitDonorDarahUdds', 'id', 'user_login_id');
- // }
-
- // public function rumah_sakit()
- // {
- // return $this->belongsTo('App\Model\User\MasterRumahSakits', 'id', 'user_login_id');
- // }
- }
|