I am having a javascript like this which will call two different controller in two diff situation .... Now the problem is it is one get method and one is destroy method ... when
You are trying to access a javascript variable inside a php helper function will not work. I'm not sure what's passing id into that function, but if it's being passed into the view via PHP, then you should use {{ action('FollowsController@show', array($id)) }}
If it's not being passed into the view, then you would have to use myUrl = '/follow/'+id
and make sure you have routes for both GET
and DELETE
.