@php /** * Non-removable "Powered by AGS Vocab" attribution. * * Rendered in the Filament admin footer for every tenant whose * School::mustShowAgsAttribution() returns true. Enterprise tier * with is_ags_branding_locked = false (e.g. AGS HQ itself) is the * only case where this returns nothing. * * Also referenced (semantically) by the Flutter app — that side * reads the same flag from GET /api/config and renders an * equivalent footer chip. */ use App\Models\School; use Filament\Facades\Filament; $school = null; try { $tenant = Filament::getTenant(); if ($tenant instanceof School) { $school = $tenant; } } catch (\Throwable $e) { // Filament panel may not be the active panel (e.g. rendered from a // non-Filament view) — fall through to the default behaviour. } $shouldShow = $school === null ? true // safer default: show the badge : $school->mustShowAgsAttribution(); if (! $shouldShow) { return; } $label = config('tenancy.attribution_label', 'Powered by AGS Vocab'); $url = config('tenancy.attribution_url', 'https://allgifted.com/vocab'); @endphp