Skip to content

[5.6] Signed routes with routable parameters#23584

Merged
taylorotwell merged 1 commit into
laravel:5.6from
mattdfloyd:5.6
Mar 17, 2018
Merged

[5.6] Signed routes with routable parameters#23584
taylorotwell merged 1 commit into
laravel:5.6from
mattdfloyd:5.6

Conversation

@mattdfloyd

Copy link
Copy Markdown
Contributor

This adds the ability to pass in a parameter that implements the UrlRoutable interface when generating a signed route.

Given

class Invoice extends Model
{
    ...
}

and

Route::get('invoices/{invoice}', 'InvoiceController@show')->name('invoices.show');

then

return url()->signedRoute('invoices.show', Invoice::first());

will generate a signed url for the invoice.

@GrahamCampbell GrahamCampbell changed the title Signed routes with routable parameters [5.6] Signed routes with routable parameters Mar 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants