/** * Display the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function show($id) { $place = Place::with(['city', 'category'])->whereId($id)->first(); $categories = Category::all(); $cities = City::all(); return view('client.placeinfo', compact('place', 'categories', 'cities')); }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $places = Place::with('cuisine')->with('visit')->get(); return view('location.index', compact('places')); }