Skip to content

Component.Form

xandor edited this page Oct 17, 2017 · 2 revisions
    @component('bsComp::form', [
        'method' => 'PUT', 
        'action' => route('post.update', $post->id)
    ])
       <input name="body" value="">
    @endcomponent

Adds the csrf field automatically by default except for method = GET

Adds also the method field when required

Parameters

Parameter Type Description
method string method: post (default), get, put, delete, patch
action string target url
addCsrf bool add the CSRF field: true (default), false
class string additional css classes
style string additional css styles
id string html id

Slot

Slot Description
-Default- content of the form

Home

Components

Custom Components

Clone this wiki locally