@php $contact = $ws->contact(); $schemaType = $schemaType ?? 'EducationalOrganization'; $address = array_filter([ '@type' => 'PostalAddress', 'streetAddress' => $contact['address'] ?: null, 'addressLocality' => $contact['city'] ?: null, 'addressRegion' => $contact['state'] ?: null, 'addressCountry' => $websiteSchool->country ?? 'NG', ]); $schema = array_filter([ '@context' => 'https://schema.org', '@type' => $schemaType, 'name' => $websiteSchool->name, 'description' => Str::limit(strip_tags((string) ($metaDescription ?? $ws->seo()['meta_description'])), 300), 'url' => tenant_url('public.home', $websiteSchool->slug), 'logo' => $ws->branding()['logo'], 'telephone' => $contact['phone'] ?: null, 'email' => $contact['email'] ?: null, 'openingHours' => $contact['hours'] ?: null, 'address' => count($address) > 1 ? $address : null, ]); @endphp