*/ use HasFactory, HasRoles, Notifiable; /** * The attributes that are mass assignable. * * @var list */ protected $fillable = [ 'name', 'email', 'no_telefon', 'jawatan', 'jabatan_id', 'status', 'last_login_at', 'password', ]; /** * The attributes that should be hidden for serialization. * * @var list */ protected $hidden = [ 'password', 'remember_token', ]; /** * Get the attributes that should be cast. * * @return array */ protected function casts(): array { return [ 'email_verified_at' => 'datetime', 'last_login_at' => 'datetime', 'status' => 'boolean', 'password' => 'hashed', ]; } public function jabatan() { return $this->belongsTo(Jabatan::class, 'jabatan_id'); } public function permohonan() { return $this->hasMany(Permohonan::class); } }