HeartOfprogrammer HeartOfprogrammer - 4 months ago 36
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" />


Use this

 <form method="post" action="{{ route('news.destroy', $news->id)}}" accept-     charset="UTF-8">
     <input type="submit" value="Delete" />