Mercurial > packages > magicforger
view src/Generator/View/stubs/create_edit.stub @ 31:8dd668020310 codex
started converting too bootstrap, also better support for casts
| author | Luka Sitas <sitas.luka.97@gmail.com> |
|---|---|
| date | Tue, 19 Aug 2025 20:34:53 -0400 |
| parents | 555bfaa500ac |
| children |
line wrap: on
line source
<x-app-layout> <x-slot name="header"> <h2 class="fw-semibold fs-4 text-dark"> {{ isset($item) ? 'Edit' : 'Create' }} {{ ucfirst('{{ modelVariable }}') }} </h2> </x-slot> <div class="py-5"> <div class="container"> <div class="bg-white shadow-sm rounded p-4"> <form method="POST" action="{{ isset($item) ? route('{{ tableName }}.update', $item) : route('{{ tableName }}.store') }}"> @csrf @if (isset($item)) @method('PUT') @endif {{ fieldsInsertPoint }} <div class="d-flex justify-content-end"> <a href="{{ route('{{ tableName }}.index') }}" class="btn btn-secondary me-2">Back</a> <button type="submit" class="btn btn-primary"> {{ isset($item) ? 'Update' : 'Create' }} </button> </div> </form> </div> </div> </div> </x-app-layout>
