I use Laravel 5.3 and I have named all my routes.
I want to use the route() function and include my $_GET params.
This is what I've tried :
<a href="{{ route('myRoute', ['id' => $id, 'slug' => str_slug($name)], request()->all()]) }}">
Or
<a href="{{ route('myRoute', [array_merge(['id' => $id, 'slug' => str_slug($name)], request()->all())]) }}">
For now, I got this error
ErrorException in UrlGenerator.php line 377: Array to string conversion (View: ....
Is there a way to include all params ? I don't want to list them one by one. Thanks
EDIT
I had en error in my code, now it works with :
<a href="{{ route('myRoute', array_merge(['id' => $id, 'slug' => str_slug($name)], request()->all())) }}">