New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.6] Signed routes with routable parameters #23584

Merged
merged 1 commit into from Mar 17, 2018

Conversation

Projects
None yet
2 participants
@mattdfloyd
Copy link
Contributor

mattdfloyd commented Mar 17, 2018

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

@mattdfloyd mattdfloyd force-pushed the mattdfloyd:5.6 branch from dbaa480 to 35aca83 Mar 17, 2018

@taylorotwell taylorotwell merged commit 12ebdee into laravel:5.6 Mar 17, 2018

2 checks passed

continuous-integration/styleci/pr The StyleCI analysis has passed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment