Mercurial > packages > magicforger
diff src/Generator/View/stubs/create_edit.stub @ 34:f65ab84ee47f default
merge with codex
| author | luka |
|---|---|
| date | Wed, 10 Sep 2025 21:00:47 -0400 |
| parents | 8dd668020310 |
| children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/Generator/View/stubs/create_edit.stub Wed Sep 10 21:00:47 2025 -0400 @@ -0,0 +1,30 @@ +<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>
