License Key Required
No license key entered.
Enter or update your key with php artisan news:license <key>,
or purchase one at scriptgain.com.
Index
site.records.index
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 every public page by the site layout.- Validation error bag. Always present. Pairs with @error('field').
- All site settings as an array, e.g. $site['site_name'].
- The municipality's short display name.
- The full legal name, e.g. "City Of Springfield".
- Main navigation items. Loop over it with @foreach.
- The small utility links in the top bar.
- The footer navigation links.
- The Quick Links grid items.
- The first few Quick Links, featured in the hero.
- The current emergency alert, or null when none is live.
- Up to eight departments listed in the footer.
- The configured page-width class, e.g. max-w-7xl. Use on your outer container.
- The current year, for the footer copyright line.
- URL of the uploaded site logo, or null.
- URL of the uploaded favicon, or null.
In This Template
- Agency Name.
- Disclaimer.
- Intro.
- Range.
- Ranges.
- Records.
- Retention Days.
- Roster Enabled.
- Search.
- Search Enabled.
- Show Case Number.
- Takedown Contact.
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.public title="Arrest Records"
description="Recent bookings reported by the police department. An arrest is not a conviction.">
<x-site.page-hero title="Arrest Records"
:eyebrow="$agencyName"
subtitle="Recent bookings, the charges filed at the time of booking, and the current disposition of each case."
icon="shield"
:crumbs="[['label' => 'Arrest Records']]" />
<x-site.section :divider="false">
<x-site.records-disclaimer :disclaimer="$disclaimer"
:takedownContact="$takedownContact"
:retentionDays="$retentionDays" />
@if ($intro)
<div class="mt-8 prose-civic max-w-3xl">
<p>{{ $intro }}</p>
</div>
@endif
</x-site.section>
<x-site.section title="Booking Blotter" subtitle="Newest bookings first."
:href="$rosterEnabled ? route('site.records.roster') : null"
linkLabel="View The Inmate Roster">
{{-- Filters. A plain GET form so results are linkable and work without JS. --}}
<form method="GET" role="search" aria-label="Filter Arrest Records"
class="rounded-2xl bg-slate-50 p-5 ring-1 ring-inset ring-slate-200">
<div class="grid gap-4 sm:grid-cols-2 lg:grid-cols-4 lg:items-end">
<div class="space-y-1.5">
<label for="range" class="block text-sm font-medium text-slate-700">Date Range</label>
<x-select id="range" name="range">
@foreach ($ranges as $key => $label)
<option value="{{ $key }}" @selected($range === (string) $key)>{{ $label }}</option>
@endforeach
</x-select>
</div>
@if ($searchEnabled)
<div class="min-w-0 space-y-1.5 lg:col-span-2">
<label for="q" class="block text-sm font-medium text-slate-700">Search By Name, Case Number, Or Agency</label>
<x-input id="q" name="q" type="search" :value="$search" placeholder="Search Arrest Records…" />
</div>
@endif
<div class="flex items-center gap-2">
<x-button type="submit" icon="filter">Apply Filters</x-button>
@if ($search || $range !== '30')
<x-button variant="secondary" :href="route('site.records.blotter')">Reset</x-button>
@endif
</div>
</div>
</form>
<div class="mt-8">
@if ($records->count())
<p class="mb-5 text-sm text-slate-500" role="status">
Showing {{ $records->count() }} of {{ $records->total() }} published record(s).
</p>
<ul class="space-y-4">
@foreach ($records as $record)
<li class="rounded-2xl bg-white p-5 sm:p-6 ring-1 ring-slate-200 shadow-sm">
<div class="flex flex-wrap items-start justify-between gap-5">
<div class="flex min-w-0 items-start gap-4">
@if ($record->showsMugshot())
<img src="{{ news_upload_url($record->mugshot_path) }}"
alt="Booking photograph of {{ $record->fullName() }}"
class="h-20 w-16 shrink-0 rounded-lg object-cover ring-1 ring-slate-200">
@endif
<div class="min-w-0">
<h3 class="font-display text-lg font-semibold text-slate-900">
<a href="{{ route('site.records.show', $record->public_ref) }}"
class="rounded hover:text-brand-700 hover:underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-brand-600">
{{ $record->fullName() }}
</a>
</h3>
<p class="mt-1 text-sm text-slate-500">
@if ($record->age) Age {{ $record->age }} at booking · @endif
Booked {{ $record->booked_at->format(config('news.date_format') . ', ' . config('news.time_format')) }}
</p>
<p class="mt-0.5 text-sm text-slate-500">{{ $record->arresting_agency }}</p>
@if ($record->charges->count())
<ul class="mt-3 flex flex-wrap gap-2">
@foreach ($record->charges as $charge)
<li>
<x-badge :color="$charge->severityColor()">
{{ $charge->description }}@if ($charge->counts > 1) ({{ $charge->counts }} counts)@endif
</x-badge>
</li>
@endforeach
</ul>
@endif
</div>
</div>
<div class="flex shrink-0 flex-col items-start gap-2 sm:items-end">
<x-badge :color="$record->dispositionColor()" dot>{{ $record->dispositionLabel() }}</x-badge>
<x-badge :color="$record->custodyColor()">{{ $record->custodyLabel() }}</x-badge>
@if ($showCaseNumber && $record->case_number)
<span class="text-xs font-medium text-slate-400">Case {{ $record->case_number }}</span>
@endif
</div>
</div>
</li>
@endforeach
</ul>
<div class="mt-8">{{ $records->links() }}</div>
@else
<x-site.empty title="No Records Match This Filter" icon="shield"
message="Try widening the date range. Records are removed from this page once their retention period ends." />
@endif
</div>
</x-site.section>
</x-layouts.public>
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.