I am having problems with JQ controller and laravel.
Since this is a JS file that should call the controller with a value in it.
function follow_or_unfollow(id,action)
{
either route call
myUrl = "{{ route('follows.show','id') }}" ;
or controller call
myUrl = "{{ action('FollowsController@show', 'id') }}" ;
bla bla bla !
}
I need to: send the id value, typing where "id" is specified. currently it prints as id instead of id value. I tried a few things like
'+id+'
'"+id+"'
and sending data to others. but the laravel controller does not expect to receive data in the route / action method from outside. Any help would be appreciated. Thanks in advance.
source
share