Mercurial > packages > magicforger
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 30:21439512ba69 | 31:8dd668020310 |
|---|---|
| 1 <x-app-layout> | 1 <x-app-layout> |
| 2 <x-slot name="header"> | 2 <x-slot name="header"> |
| 3 <h2 class="font-semibold text-xl text-gray-800 leading-tight"> | 3 <h2 class="fw-semibold fs-4 text-dark"> |
| 4 {{ isset($item) ? 'Edit' : 'Create' }} {{ ucfirst('{{ modelVariable }}') }} | 4 {{ isset($item) ? 'Edit' : 'Create' }} {{ ucfirst('{{ modelVariable }}') }} |
| 5 </h2> | 5 </h2> |
| 6 </x-slot> | 6 </x-slot> |
| 7 | 7 |
| 8 <div class="py-12"> | 8 <div class="py-5"> |
| 9 <div class="max-w-2xl mx-auto sm:px-6 lg:px-8"> | 9 <div class="container"> |
| 10 <div class="bg-white overflow-hidden shadow-sm sm:rounded-lg p-6"> | 10 <div class="bg-white shadow-sm rounded p-4"> |
| 11 <form method="POST" action="{{ isset($item) ? route('{{ tableName }}.update', $item) : route('{{ tableName }}.store') }}"> | 11 <form method="POST" action="{{ isset($item) ? route('{{ tableName }}.update', $item) : route('{{ tableName }}.store') }}"> |
| 12 @csrf | 12 @csrf |
| 13 @if(isset($item)) | 13 @if (isset($item)) |
| 14 @method('PUT') | 14 @method('PUT') |
| 15 @endif | 15 @endif |
| 16 | 16 |
| 17 {{ fieldsInsertPoint }} | 17 {{ fieldsInsertPoint }} |
| 18 | |
| 19 | 18 |
| 20 <div class="flex justify-end"> | 19 <div class="d-flex justify-content-end"> |
| 21 <a href="{{ route('{{ tableName }}.index') }}" class="mr-2 px-4 py-2 bg-gray-200 rounded hover:bg-gray-300">Back</a> | 20 <a href="{{ route('{{ tableName }}.index') }}" |
| 22 <button type="submit" class="px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700"> | 21 class="btn btn-secondary me-2">Back</a> |
| 22 <button type="submit" class="btn btn-primary"> | |
| 23 {{ isset($item) ? 'Update' : 'Create' }} | 23 {{ isset($item) ? 'Update' : 'Create' }} |
| 24 </button> | 24 </button> |
| 25 </div> | 25 </div> |
| 26 </form> | 26 </form> |
| 27 </div> | 27 </div> |
