samedi 2 juillet 2016

How to use form element in Laravel 5.2 without using form facade?

As I am new to laravel framework, I have a query, I am using tag in blade template so that I can delete the data from table.

I am using this the below code of form tag to delete the data

 <form action="" id="form_sample_2" class="form-horizontal" novalidate="novalidate" method="PUT">

Here I have used method as PUT, but browser is automatically considering it as GET request, I found some questions on stackoverflow where many of them said PUT & DELETE is not detected by browser.

So using Laravel Facade Form , this problem is solved

{!! Form::open(array('route'=>['admin.states.update',$data->state_id],'role'=>'form','method'=>'PUT')) !!}

The above code work as intended but my query is I don't want to use Formfacade in Laravel , I want to use first type of HTML code for form opening.

Is there any other method by which I can use PUT method in HTML Form Tag without using any Form FAcade in Laravel.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire