laravel destroy函数生成错误的url

This is my code:

{{link_to_route('actions.destroy', 'Delete', $action->id, array('class' => 'myButton2'))}}

This is the generated url:

<a href="http://localhost:8082/myProjectName/public/actions/1" class="myButton2">Delete</a>

It is wrong url.

how to fix it please?

Thanks

You can create a submit button by opening a form :

{{Form::open(array('route' =>array('actions.destroy',$action->id),'method'=>'delete', 'class' => 'delete'))}}
{{Form::submit('delete')}}
{{Form::close()}}

And in your controller do not forget to add:

public function destroy($id)
{
    Yourtable::destroy($id);
}