Mercurial > packages > magicforger
view src/Generator/View/stubs/show.stub @ 26:555bfaa500ac codex
Big update for view creation based on the column type.
| author | Luka Sitas <sitas.luka.97@gmail.com> |
|---|---|
| date | Thu, 15 May 2025 21:50:38 -0400 |
| parents | 1a717c7b211f |
| children | 8dd668020310 |
line wrap: on
line source
<x-app-layout> <x-slot name="header"> <h2 class="font-semibold text-xl text-gray-800 leading-tight"> {{ ucfirst('{{ modelVariable }}') }} Details </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"> <div class="space-y-4"> @foreach($fields as $field) <div> <span class="font-semibold">{{ ucfirst($field) }}:</span> <span class="ml-2">{{ $item->$field }}</span> </div> @endforeach </div> <div class="flex justify-end mt-6"> <a href="{{ route('{{ tableName }}.edit', $item) }}" class="mr-2 px-4 py-2 bg-yellow-400 text-white rounded hover:bg-yellow-500">Edit</a> <a href="{{ route('{{ tableName }}.index') }}" class="px-4 py-2 bg-gray-200 rounded hover:bg-gray-300">Back</a> </div> </div> </div> </div> </x-app-layout>
