License Key Required
No license key entered.
Enter or update your key with php artisan health:license <key>,
or purchase one at scriptgain.com.
Create
site.report.create
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 school'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
- Categories.
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="Help Request">
<x-site.page-hero title="Help Request"
subtitle="Tell us about a facilities, technology, transportation, or general concern and we'll route it to the right staff. No account required."
:crumbs="[['label' => 'Help Request']]" />
<x-site.section :divider="false">
<div class="grid gap-10 lg:grid-cols-3">
<div class="min-w-0 lg:col-span-2">
<form method="POST" action="{{ route('site.report.store') }}" enctype="multipart/form-data" class="space-y-8">
@csrf
<fieldset class="rounded-2xl bg-white p-6 ring-1 ring-slate-200">
<legend class="px-2 font-display text-xl font-semibold text-slate-900">What Is The Problem?</legend>
<div class="mt-4 space-y-5">
<div>
<label for="category" class="block text-sm font-medium text-slate-700">Type Of Issue <span class="text-rose-600">*</span></label>
<select id="category" name="category" required
class="mt-1.5 block w-full rounded-lg border-0 py-2.5 pl-3 pr-9 text-sm ring-1 ring-inset ring-slate-300 focus:ring-2 focus:ring-brand-600">
@foreach ($categories as $category)
<option value="{{ $category }}" @selected(old('category') === $category)>{{ $category }}</option>
@endforeach
</select>
@error('category')<p class="mt-1.5 text-sm text-rose-600">{{ $message }}</p>@enderror
</div>
<div>
<label for="description" class="block text-sm font-medium text-slate-700">Describe The Issue <span class="text-rose-600">*</span></label>
<textarea id="description" name="description" rows="6" required aria-describedby="description-help"
class="mt-1.5 block w-full rounded-lg border-0 py-2.5 px-3 text-sm ring-1 ring-inset ring-slate-300 focus:ring-2 focus:ring-brand-600">{{ old('description') }}</textarea>
<p id="description-help" class="mt-1.5 text-sm text-slate-500">The more specific you are, the faster a crew can find it.</p>
@error('description')<p class="mt-1.5 text-sm text-rose-600">{{ $message }}</p>@enderror
</div>
<div>
<label for="location_text" class="block text-sm font-medium text-slate-700">Where Is It?</label>
<input id="location_text" name="location_text" type="text" value="{{ old('location_text') }}"
placeholder="Nearest address, intersection, or landmark"
class="mt-1.5 block w-full rounded-lg border-0 py-2.5 px-3 text-sm ring-1 ring-inset ring-slate-300 focus:ring-2 focus:ring-brand-600">
@error('location_text')<p class="mt-1.5 text-sm text-rose-600">{{ $message }}</p>@enderror
</div>
<div>
<label for="photo" class="block text-sm font-medium text-slate-700">Add A Photograph</label>
<input id="photo" name="photo" type="file" accept="image/*"
class="mt-1.5 block w-full text-sm text-slate-600 file:mr-3 file:rounded-lg file:border-0 file:bg-brand-50 file:px-4 file:py-2.5 file:text-sm file:font-medium file:text-brand-700 hover:file:bg-brand-100">
@error('photo')<p class="mt-1.5 text-sm text-rose-600">{{ $message }}</p>@enderror
</div>
</div>
</fieldset>
<fieldset class="rounded-2xl bg-white p-6 ring-1 ring-slate-200">
<legend class="px-2 font-display text-xl font-semibold text-slate-900">How Can We Reach You?</legend>
<p class="mt-2 text-sm text-slate-500">
Optional, but leaving an email is the only way we can update you or ask a follow-up question.
</p>
<div class="mt-5 grid gap-5 sm:grid-cols-2">
<div>
<label for="reporter_name" class="block text-sm font-medium text-slate-700">Your Name</label>
<input id="reporter_name" name="reporter_name" type="text" value="{{ old('reporter_name') }}"
class="mt-1.5 block w-full rounded-lg border-0 py-2.5 px-3 text-sm ring-1 ring-inset ring-slate-300 focus:ring-2 focus:ring-brand-600">
</div>
<div>
<label for="reporter_email" class="block text-sm font-medium text-slate-700">Email Address</label>
<input id="reporter_email" name="reporter_email" type="email" value="{{ old('reporter_email') }}"
class="mt-1.5 block w-full rounded-lg border-0 py-2.5 px-3 text-sm ring-1 ring-inset ring-slate-300 focus:ring-2 focus:ring-brand-600">
@error('reporter_email')<p class="mt-1.5 text-sm text-rose-600">{{ $message }}</p>@enderror
</div>
<div>
<label for="reporter_phone" class="block text-sm font-medium text-slate-700">Phone Number</label>
<input id="reporter_phone" name="reporter_phone" type="tel" value="{{ old('reporter_phone') }}"
class="mt-1.5 block w-full rounded-lg border-0 py-2.5 px-3 text-sm ring-1 ring-inset ring-slate-300 focus:ring-2 focus:ring-brand-600">
</div>
</div>
<div class="mt-6">
<x-toggle name="is_anonymous" :checked="old('is_anonymous', false)"
label="Submit Anonymously"
description="We will not store your name, email, or phone number. You will still get a tracking link." />
</div>
</fieldset>
<x-captcha context="report" />
<div class="flex flex-wrap items-center gap-3">
<button type="submit"
class="inline-flex items-center gap-2 rounded-lg bg-brand-700 px-6 py-3.5 text-base font-semibold text-white shadow-sm transition hover:bg-brand-800">
<x-icon name="bolt" class="w-5 h-5" /> Submit This Report
</button>
<a href="{{ route('site.track') }}" class="text-sm font-semibold text-brand-700 hover:underline">Already Reported Something? Track It</a>
</div>
</form>
</div>
<aside class="space-y-6">
<div class="rounded-2xl bg-rose-50 p-6 ring-1 ring-rose-200">
<h2 class="font-semibold text-rose-900">In An Emergency, Call 911</h2>
<p class="mt-2 text-sm leading-relaxed text-rose-800">
This form is checked during business hours only. For a fire, a crime in progress,
a medical emergency, or a downed power line, call 911 immediately.
</p>
@if ($site['contact_after_hours'])
<p class="mt-3 text-sm text-rose-800">
<span class="font-semibold">After Hours:</span> {{ $site['contact_after_hours'] }}
</p>
@endif
</div>
<div class="rounded-2xl bg-slate-50 p-6 ring-1 ring-slate-200">
<h2 class="font-semibold text-slate-900">What Happens Next</h2>
<span class="seal-rule mt-3 mb-4"></span>
<ol class="space-y-3 text-sm text-slate-600">
<li class="flex gap-3"><span class="font-bold text-brand-700">1.</span> You get a tracking reference immediately.</li>
<li class="flex gap-3"><span class="font-bold text-brand-700">2.</span> Staff review and route it to the right staff.</li>
<li class="flex gap-3"><span class="font-bold text-brand-700">3.</span> Updates are posted to your tracking page as work progresses.</li>
</ol>
</div>
</aside>
</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.