*/ use HasFactory, Notifiable; /** * The attributes that are mass assignable. * * @var list */ protected $connection = 'dbDirectory'; protected $table = 'public.loginuser_s'; public $timestamps = false; protected $primaryKey = "id"; protected $guarded = [ 'id', ]; /** * The attributes that should be hidden for serialization. * * @var list */ protected $hidden = [ 'katasandi' ]; /** * Get the attributes that should be cast. * * @return array */ protected function casts(): array { return [ 'katasandi' => 'hashed', ]; } protected $with = ['dataUser']; public function dataUser(){ return $this->belongsTo(DataUser::class, 'objectpegawaifk', 'id')->select('id', 'namalengkap'); } }