Skip to content

Commit

Permalink
Add edit form
Browse files Browse the repository at this point in the history
  • Loading branch information
techenby committed Apr 25, 2024
1 parent b1604c4 commit 1328191
Showing 1 changed file with 26 additions and 4 deletions.
30 changes: 26 additions & 4 deletions resources/views/tricks/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,31 @@
</h2>
</x-slot>

<div class="py-12">
<div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
<x-container>
<x-form method="PUT" action="{{ route('tricks.update', $trick) }}">
<div>
<x-input-label for="name" :value="__('Name')" />
<x-text-input id="name" class="block mt-1 w-full" type="text" name="name" :value="old('name') ?? $trick->name" required autofocus />
<x-input-error :messages="$errors->get('name')" class="mt-2" />
</div>

</div>
</div>
<div>
<x-input-label for="description" :value="__('Description')" />
<x-form.textarea id="description" class="block mt-1 w-full" name="description" :value="old('description') ?? $trick->description" required />
<x-input-error :messages="$errors->get('description')" class="mt-2" />
</div>

<div>
<x-input-label for="code" :value="__('Code')" />
<x-form.textarea id="code" class="block mt-1 w-full" name="code" :value="old('code') ?? $trick->code" required />
<x-input-error :messages="$errors->get('code')" class="mt-2" />
</div>

<div class="flex items-center justify-end mt-4">
<x-primary-button class="ms-3">
{{ __('Save Changes') }}
</x-primary-button>
</div>
</x-form>
</x-container>
</x-app-layout>

0 comments on commit 1328191

Please sign in to comment.