HeartOfprogrammer HeartOfprogrammer - 1 year ago 149
PHP Question

How to convert HTML FORM to simple html code in laravel?

I need to convert this HTML FORM

{!! Form::open(['route' => ['news.destroy', $news->id], 'method' => 'delete']) !!}
<input type="submit" value="Delete" />
{!! Form::close() !!}
<div class="pull-right"><em>{{'Author - ' . $news->author }}</em></div>

To a simple HTML form

I have tried this, but it didn't work

<form action="{{ route('news.destroy', $news->id, ['method' => 'delete']) }}">
<input type="submit" value="delete" />

Answer Source

Use this

 <form method="post" action="{{ route('news.destroy', $news->id)}}" accept-     charset="UTF-8">
     <input type="submit" value="Delete" />
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download