v1.0.0 initial release
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
@props([
|
||||
'method' => 'post',
|
||||
'action' => null,
|
||||
])
|
||||
|
||||
@php
|
||||
$spoofed = in_array(strtolower($method), ['put', 'patch', 'delete']);
|
||||
@endphp
|
||||
|
||||
<form method="{{ strtolower($method) === 'get' ? 'get' : 'post' }}"
|
||||
action="{{ $action }}"
|
||||
{{ $attributes }}>
|
||||
|
||||
@if(strtolower($method) !== 'get')
|
||||
@csrf
|
||||
@endif
|
||||
|
||||
@if($spoofed)
|
||||
@method($method)
|
||||
@endif
|
||||
|
||||
{{ $slot }}
|
||||
</form>
|
||||
Reference in New Issue
Block a user