So in my Laravel project I have routes foor requests, which look classically like
Route::get('edit/{user}', 'AdminUserController@getUser');
Route::post('delete', 'AdminUserController@deleteUser');
etc. The problem is that I don't know how to pass variables via get request links. For example, when I pass some variable with my link, like
$.get("{{action('Admin\AdminUserController@editUser')}}", {user: id})
I get link that looks like
/edit?user=123
And this format does not match with one written in roures.php, where just slash is mentioned. What should I do to make this work properly? Somehow make get request look like /edit/123 or rewrite something in routes?
P.S I know that I could simply use $.get('/edit/'+id)
, but I strongly need it to be {{action}}
!