first(); if (empty($cat)) { return redirect('/category'); } $listCategories = Category::query(); $listCategories->select("bc_categories.*") ->where("bc_categories.status", "publish"); $translation = $cat->translateOrOrigin(app()->getLocale()); $data = [ 'rows' => $listCategories->with("getAuthor")->paginate(5), 'breadcrumbs' => [ [ 'name' => __('Category'), 'url' => route('category.index') ], [ 'name' => $translation->name, 'class' => 'active' ], ], 'page_title'=>$translation->name, 'seo_meta' => $cat->getSeoMetaWithTranslation(app()->getLocale(),$translation), 'translation'=>$translation ]; return view('Candidate::frontend.index', $data); } }