How to pass value from a button to a controller method in laravel 5
<p>I working on a simple laravel 5.2 application. I want to pass a value <code>$id</code> from the view when a button is clicked to the controller method <code>destroy()</code>. This is what i have tried:
This is my route</p>

<pre><code>Route::get('delete/{id}', array('as' =&gt; 'delete', 'uses' =&gt; 'ContactsController@destroy'));
</code></pre>

<p>... and this is my button in a view:</p>

<pre><code>&lt;a href="{{ action('ContactsController@destroy/{$contacts-&gt;id}/') }}" class="btn btn-danger"&gt;Delete&lt;/a&gt;
</code></pre>

<p>But this code didn't work. Thanks for any help.</p>