ajax()) { return self::getDatatable($request); } else { $data = []; return view('Shop.Sections.list', $data); } } public function getDatatable(Request $request) { return Sections::getTables($request->all()); } /** * Display the specified resource. * * @param \App\Customer $customer * @return \Illuminate\Http\Response */ public function show(Customer $customer) { $data = Sections::get($id); return view('Shop.Admin.Sections.view', $data); } }