I'm really not sure if I understood your question correctly but here's a try.
Consider this route:
Route::get('/test/:id/:category', ['as' => 'testroute', 'uses' => 'TestController@test']);
You can use the route() helper function to create a URL from a route name (in this case the routename is testroute). So in a controller you could do this:
return redirect(route('testroute', ['id' => 5, 'category' => 'testcategory']));
and the route() function would give you the URL /test/5/testcategory
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community