I want to pass parameter using ? in url, like
http://example.com/somthing?name=myname&phone=12121212
when i add a '?' in Route file it shows 404
In my route file
Route::get('test?id={id}&name={name}','TestController@test')->name('frontend.test');
My controller
public function test($id, $name)
{
dd($name);
}
But when i use it like this works fine
Route File:
Route::get('test/id={id}&name={name}','TestController@test')->name('frontend.test');
Controller:
public function test(Request $request)
{
dd($request->route()->parameters());
}
i have a project with raw php i want to convert it to Laravel, so i don't want to change the url structure.
how can i achieve this in Laravel route.