@extends('admin.layouts.app') @php /** @var class-string<\App\Admin\Resource> $resource */ $editing = $record !== null; $heading = $editing ? 'Edit email template' : 'Add email template'; $fields = collect($resource::formFields(! $editing))->keyBy('name'); $backUrl = $editing ? route($resource::routeName('show'), $record) : route($resource::routeName('index')); $categoryLabel = $editing ? ($resource::CATEGORIES[$record->category] ?? \Illuminate\Support\Str::headline($record->category)) : null; @endphp @section('title', $heading) @section('page-title', $resource::$label) @section('content')
@include('admin.partials.icon', ['name' => 'back']) Back
@csrf @if($editing) @method('PUT') @endif
@endsection