License Key Required
No license key entered.
Enter or update your key with php artisan health:license <key>,
or purchase one at scriptgain.com.
Seo Health
settings.seo-health
Compiled PHP
What Blade turns your template into. This is what the syntax check parses.
Loading…
Available Variables And Components
A guide to what this template can use, derived from the shipped source. Click any item to insert it at your cursor. It is a helpful reference, not a runtime guarantee.
Always Available
Shared with the admin panel by the staff layout.- Validation error bag. Always present. Pairs with @error('field').
- The admin sidebar navigation structure.
- Sub-items of the currently open nav group.
- Breadcrumb trail for the current page.
- Signed-in staffer's initials, for the avatar.
- Signed-in staffer's name.
- Signed-in staffer's email address.
- The staffer's role, e.g. "Administrator".
- True when the signed-in staffer is an administrator.
- Number of open service requests, for the badge.
- Number of unread form submissions, for the badge.
- The configured admin-shell width class.
- URL of the uploaded site logo, or null.
- URL of the uploaded favicon, or null.
In This Template
- Discouraged.
- Groups.
- Sitemap Total.
- Summary.
Drop any of these in. Click to insert the opening tag at your cursor.
General
Admin Panel
Layouts
Records
Site (Public)
Common Blade
- Print a value, safely escaped. The default choice.
- Print raw HTML. Only for content you trust.
- Show something conditionally.
- Loop over a collection.
- Loop, with a fallback when the collection is empty.
- Show a validation message for a field.
- A small block of PHP. Never on line 1. Keep logic out of templates.
- A comment that never reaches the browser.
Civic Helpers
- Build a URL to a named route, e.g. a department page.
- Link to a single news post.
- Turn a stored upload path into a public URL.
- A cache-busted URL for a bundled asset.
- Read a config value, e.g. the site width class.
- Build an absolute URL to a path.
No History Yet
Every save, revert, and reset of this template is recorded here, with a one-click way back to any of them.
The Template That Shipped With The Product
Read only. This is what Reset To Default puts back.
<x-layouts.app title="SEO Health">
<x-page-header title="SEO Health" icon="shield"
subtitle="What residents will and will not find when they search for this municipality.">
<x-slot:actions>
<x-button variant="secondary" icon="settings" :href="route('settings.seo.edit')">SEO Settings</x-button>
</x-slot:actions>
</x-page-header>
@if ($discouraged)
<x-alert type="warn" class="mb-6" title="This Site Is Hidden From Search Engines">
The site-wide discourage switch is on, so nothing below is reachable by Google regardless of
its individual settings. Turn it off under SEO Settings before launch.
</x-alert>
@endif
<div class="grid gap-4 sm:grid-cols-2 lg:grid-cols-4 mb-6">
<x-stat label="Indexable Records" :value="number_format($summary['indexable'])" icon="globe" />
<x-stat label="URLs In Sitemap" :value="number_format($sitemapTotal)" icon="database" />
<x-stat label="Needs Attention" :value="number_format($summary['problems'])" icon="warning" />
<x-stat label="Hidden From Search" :value="number_format($summary['hidden'])" icon="shield" />
</div>
@if ($summary['problems'] === 0)
<x-alert type="success" class="mb-6" title="Nothing Needs Fixing">
Every public record has a usable title and a description of a sensible length, and no two
share a title.
</x-alert>
@endif
{{-- Tabs rather than seven stacked lists: each check is its own job, and a
site with a few hundred records would otherwise be one long scroll. --}}
<x-tabs :tabs="[
'missing' => ['label' => 'Missing Descriptions', 'icon' => 'warning', 'count' => count($groups['missing']['rows'])],
'duplicates' => ['label' => 'Duplicate Titles', 'icon' => 'copy', 'count' => count($groups['duplicates']['rows'])],
'long' => ['label' => 'Too Long', 'icon' => 'edit', 'count' => count($groups['long']['rows'])],
'short' => ['label' => 'Too Short', 'icon' => 'edit', 'count' => count($groups['short']['rows'])],
'titles' => ['label' => 'Long Titles', 'icon' => 'edit', 'count' => count($groups['titles']['rows'])],
'no_custom_title' => ['label' => 'No Custom Title', 'icon' => 'info', 'count' => count($groups['no_custom_title']['rows'])],
'hidden' => ['label' => 'Hidden', 'icon' => 'shield', 'count' => count($groups['hidden']['rows'])],
]">
@foreach ($groups as $key => $group)
<x-tab-panel :name="$key">
<x-card :title="$group['label']" :subtitle="$group['help']" flush>
@if (count($group['rows']))
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-slate-100 text-sm">
<thead class="bg-slate-50/80">
<tr>
<th scope="col" class="px-5 py-3 text-left text-[11px] font-semibold uppercase tracking-[0.12em] text-slate-500">Record</th>
<th scope="col" class="px-5 py-3 text-left text-[11px] font-semibold uppercase tracking-[0.12em] text-slate-500">Type</th>
<th scope="col" class="px-5 py-3 text-left text-[11px] font-semibold uppercase tracking-[0.12em] text-slate-500">Detail</th>
<th scope="col" class="px-5 py-3 text-right text-[11px] font-semibold uppercase tracking-[0.12em] text-slate-500">Actions</th>
</tr>
</thead>
<tbody class="divide-y divide-slate-100">
@foreach ($group['rows'] as $row)
<tr class="hover:bg-slate-50/60 transition">
<td class="px-5 py-3">
<span class="inline-flex items-center gap-2">
<span @class([
'h-2 w-2 shrink-0 rounded-full',
'bg-rose-500' => $group['tone'] === 'critical',
'bg-amber-500' => $group['tone'] === 'warning',
'bg-slate-300' => $group['tone'] === 'info',
])></span>
<span class="font-medium text-slate-900">{{ $row['title'] }}</span>
</span>
</td>
<td class="px-5 py-3">
<span class="inline-flex items-center rounded-full bg-slate-100 px-2.5 py-0.5 text-xs font-medium text-slate-700">{{ $row['type'] }}</span>
</td>
<td class="px-5 py-3 text-slate-600">{{ $row['detail'] }}</td>
<td class="px-5 py-3">
<div class="flex items-center justify-end gap-2">
@if ($row['public_url'])
<a href="{{ $row['public_url'] }}" target="_blank" rel="noopener"
data-tip="Open the public page in a new tab"
class="inline-flex items-center gap-1.5 rounded-lg px-2.5 py-1.5 text-xs font-medium text-slate-600 ring-1 ring-inset ring-slate-200 transition hover:bg-slate-50">
<x-icon name="external" class="w-3.5 h-3.5" /> View
</a>
@endif
@if ($row['edit_url'])
<a href="{{ $row['edit_url'] }}"
class="inline-flex items-center gap-1.5 rounded-lg px-2.5 py-1.5 text-xs font-medium text-brand-700 ring-1 ring-inset ring-brand-200 transition hover:bg-brand-50">
<x-icon name="edit" class="w-3.5 h-3.5" /> Fix
</a>
@endif
</div>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
@else
<div class="p-5 sm:p-6">
<x-empty-state icon="check-circle" title="Nothing Here"
description="No records match this check." />
</div>
@endif
</x-card>
</x-tab-panel>
@endforeach
</x-tabs>
</x-layouts.app>
Blade In One Screen
The directives you will use most.
- Print a value, escaped. Safe by default.
- Print raw HTML. Only for content you trust.
- Show something conditionally.
- Loop over a collection.
- Use a shared component. Every component in Shared Components is available.
- A comment that never reaches the browser.
{{ $variable }}
{!! $html !!}
@if / @else / @endif
@foreach / @endforeach
<x-card>
{{-- comment --}}
House Rules
Follow these and your edits will survive updates.
-
Never start line 1 with
@php. Blade mis-parses it and the page fails. The editor refuses to save it. - Keep logic out of templates. If you need a calculation, it belongs in a composer or component class, not here.
- The shipped file is never modified. Reset To Default always gets you back.
- Every save is versioned. You can revert to any earlier version in one click.
- Press Tab inside the editor to indent rather than jump to the next field.