/** * Show the form for creating a new resource. * * @return Response */ public function hostelhome($hostel_name) { $hostel = Hostels::where('url_name', '=', $hostel_name)->first(); $hi = H_Incharge::where('hostel_id', '=', $hostel->id)->get(); $hostels = Hostels::all(); return view('Hostels.home', ['details' => $hostel, 'hostels' => $hostels, 'selected_hostel' => $hostel_name, 'incharge' => $hi]); }