Skip to content
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
Merged

Conversation

mattdfloyd
Copy link
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