<?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', ]; /** * 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'); // } }