simplePaginate(9); return view('front.service', compact('ServiceList')); } public function store(Request $request) { } public function show($id) { $ServiceList = Service::where('is_active',0)->simplePaginate(12); return view('front.service', compact('catId','ServiceList')); } /** * Show the form for editing the specified resource. * * @param \App\ClientUser $clientUser * @return \Illuminate\Http\Response */ public function edit($id,$data) { $service = Service::where('id',$id)->first(); $serviceList = Service::where('is_active',0)->get(); return view('front.serviceDetails', compact('service','serviceList')); } /** * Update the specified resource in storage. * * @param \Illuminate\Http\Request $request * @param \App\ClientUser $clientUser * @return \Illuminate\Http\Response */ public function update(Request $request, $id) { } /** * Remove the specified resource from storage. * * @param \App\ClientUser $clientUser * @return \Illuminate\Http\Response */ public function destroy($id) { } public function searchdata(Request $request) { $serviceList = Service::where('service_name', 'LIKE', "%$request->search%")->where('is_active',0)->orderBy('created_at', 'DESC')->limit(3)->get(); if($serviceList){ return $serviceList; } else{ return Redirect::back()->with("danger","Something went wrong please try again"); } } }