rezkyyustisio

User

Jun 22nd, 2021
823
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. use Illuminate\Foundation\Auth\User as Authenticatable;
  2. use Illuminate\Notifications\Notifiable;
  3.  
  4.  
  5. class User extends Authenticatable
  6. {
  7.     use Notifiable;
  8. @@ -15,8 +16,10 @@ class User extends Authenticatable
  9.      *
  10.      * @var array
  11.      */
  12.     protected $fillable = [
  13.         'name', 'email', 'password', 'last_login_at', 'last_login_ip'
  14.  
  15.     protected $table = "users";
  16.     protected $guarded = ['id'];
  17.     protected $fillable = ['name', 'username', 'jenis_kelamin', 'email', 'password', 'role', 'last_login_at', 'last_login_ip', 'avatar'
  18.     ];
  19.  
  20.     /**
  21. @@ -36,4 +39,14 @@ class User extends Authenticatable
  22.     protected $casts = [
  23.         'email_verified_at' => 'datetime',
  24.     ];
  25.  
  26.     public function dosen()
  27.     {
  28.         return $this->hasOne('App\Models\Admin\ManajDsn');
  29.     }
  30.  
  31.     public function mahasiswa()
  32.     {
  33.         return $this->hasOne('App\Models\Admin\ManajMhs');
  34.     }
  35. }
RAW Paste Data