I am new to laravel and was facing a problem. I have made a delete function in Controller and added it in the route properly. Then I connected it to a button in the view. When I press the button, it redirects me to the same page without deleting anything.
Here's my function :
public function delete_user($id){
$data = User::where('id' , $id);
$data->delete();
return route('home');
}
Here's my route :
Route::get('/delete/user/{id}' , 'UserController@delete_user');
I am adding it in view like this :
<a href="{{action('UserController@delete_user' , $user->id)}}"><button class="btn btn-info btn-fill pull-right">Delete Profile</button></a>
After redirecting there is a ? infront of the url like abcd.com/delete/1?
When I hover over the button, it shows the correct route(bottom left corner in image), but nothing is happening when I press it : 
Any help would be appreciated. Thanks
EDIT : The same function works perfectly fine in another view instance.