latest('sort')->first(); $cent_adverts = Advert::where('category_id', 33)->latest('sort')->first(); return view('index.index', compact('top_adverts', 'top_adverts')); } public function search(Request $request) { $title = $request->title; $articles = Article::query()->where('title', 'like', "%{$title}%")->paginate(); return view('index.search', compact('articles')); } }