Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
x-blade form button component
@props(['action', 'method'])
<form action="{{ $action }}" method="post">
@csrf
@isset($method)
@method($method)
@endisset
<button type="submit" {{ $attributes }}>
{{ $slot }}
</button>
</form>
<x-form-button action="{{ route('users.delete', $user) }}" method="delete" class="button bg-blue">Delete<x-form-button>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment