Skip to content

Commit a90b05d

Browse files
[9.x] to_route helper in routing (laravel#8136)
* Update routing.md * Update routing.md Co-authored-by: Taylor Otwell <[email protected]>
1 parent 184f191 commit a90b05d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

routing.md

+2
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,8 @@ Once you have assigned a name to a given route, you may use the route's name whe
305305
// Generating Redirects...
306306
return redirect()->route('profile');
307307

308+
return to_route('profile');
309+
308310
If the named route defines parameters, you may pass the parameters as the second argument to the `route` function. The given parameters will automatically be inserted into the generated URL in their correct positions:
309311

310312
Route::get('/user/{id}/profile', function ($id) {

0 commit comments

Comments
 (0)