diff 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 diff
--- a/src/Generator/View/stubs/create_edit.stub	Wed Jun 18 09:04:59 2025 -0400
+++ b/src/Generator/View/stubs/create_edit.stub	Tue Aug 19 20:34:53 2025 -0400
@@ -1,25 +1,25 @@
 <x-app-layout>
     <x-slot name="header">
-        <h2 class="font-semibold text-xl text-gray-800 leading-tight">
+        <h2 class="fw-semibold fs-4 text-dark">
             {{ isset($item) ? 'Edit' : 'Create' }} {{ ucfirst('{{ modelVariable }}') }}
         </h2>
     </x-slot>
 
-    <div class="py-12">
-        <div class="max-w-2xl mx-auto sm:px-6 lg:px-8">
-            <div class="bg-white overflow-hidden shadow-sm sm:rounded-lg p-6">
-                <form method="POST" action="{{ isset($item) ? route('{{ tableName }}.update', $item) : route('{{ tableName }}.store') }}">
-                    @csrf
-                    @if(isset($item))
+    <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="flex justify-end">
-                        <a href="{{ route('{{ tableName }}.index') }}" class="mr-2 px-4 py-2 bg-gray-200 rounded hover:bg-gray-300">Back</a>
-                        <button type="submit" class="px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700">
+                    <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>