Clean up unused variables and improve sidebar label for clarity
This commit is contained in:
@@ -148,23 +148,20 @@ class WebsiteController extends Controller
|
||||
{
|
||||
$country = $data["page"] = Country::where('status', 1)
|
||||
->where('slug', $alias)
|
||||
->with('institutions', function ($query) {
|
||||
$query->where('status', 1);
|
||||
})
|
||||
->first();
|
||||
|
||||
if (!$country) {
|
||||
return view("client.$this->path.errors.404");
|
||||
}
|
||||
|
||||
$data['countryFAQs'] = getFAQsByCategory(limit: null, order: 'desc', category: $country->slug);
|
||||
$data['countryInstitutions'] = $country->institutions;
|
||||
// $data['countryFAQs'] = getFAQsByCategory(limit: null, order: 'desc', category: $country->slug);
|
||||
// $data['countryInstitutions'] = $country->institutions;
|
||||
|
||||
$data['recentCountries'] = Country::where('status', 1)
|
||||
->where('id', '!=', $country->id)
|
||||
->inRandomOrder()
|
||||
->orderBy('created_at', 'desc')
|
||||
->take(5)->get();
|
||||
// $data['recentCountries'] = Country::where('status', 1)
|
||||
// ->where('id', '!=', $country->id)
|
||||
// ->inRandomOrder()
|
||||
// ->orderBy('created_at', 'desc')
|
||||
// ->take(5)->get();
|
||||
|
||||
return view("client.$this->path.pages.study-destination-template", $data);
|
||||
}
|
||||
|
Reference in New Issue
Block a user