Clean up unused variables and improve sidebar label for clarity

This commit is contained in:
2025-08-19 13:44:14 +05:45
parent d2a7ada38f
commit 3262e279a8
5 changed files with 15 additions and 17 deletions

View File

@@ -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);
}