@php $footerSettings = \App\Models\WebsiteSetting::current(); \App\Models\Finance\ModuleSetting::ensureDefaults(); $publicFormVisible = fn ($key) => \App\Models\Finance\ModuleSetting::allows('online_forms') && \App\Models\Finance\ModuleSetting::allows($key); $footerPages = \Illuminate\Support\Facades\Schema::hasTable('pages') && \Illuminate\Support\Facades\Schema::hasColumn('pages', 'show_in_menu') ? \App\Models\Page::query() ->where('is_published', true) ->where('show_in_menu', true) ->where('menu_location', 'footer') ->when(\Illuminate\Support\Facades\Schema::hasColumn('pages', 'visibility'), fn ($query) => $query->where('visibility', 'public')) ->orderBy('sort_order') ->orderBy('title') ->get(['slug', 'title']) : collect(); @endphp