Skip to content

Commit

Permalink
Update urls.md
Browse files Browse the repository at this point in the history
extend docs about URL generation with route helper function using multiple parameter values
  • Loading branch information
davidkroell authored Nov 18, 2018
1 parent b86ab96 commit 9d1aba1
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions urls.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,18 @@ You will often be generating URLs using the primary key of [Eloquent models](/do

echo route('post.show', ['post' => $post]);

You may also use the `route` helper in nested controllers which will need more than one parameter value. Assume the following route definition:

Route::get('/post/{post}/comment/{comment}', function () {
//
})->name('comment.show');

The `route` helper is called as the following to generate a URL with multiple parameters:

echo route('comment.show', ['post' => 1, 'comment' => 3]);

// http://example.com/post/1/comment/3

<a name="signed-urls"></a>
### Signed URLs

Expand Down

0 comments on commit 9d1aba1

Please sign in to comment.