belongsTo(User::class, 'user_id')->withTrashed(); } public function room() { return $this->belongsTo(Room::class, 'room_id')->withTrashed(); } public function type() { return $this->belongsTo(LoanType::class, 'loan_type_id'); } public function loanable() { return $this->morphTo()->withTrashed(); } }