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.7] Tuple notation for UrlGenerator actions #24738

Merged
merged 1 commit into from
Jul 4, 2018
Merged

[5.7] Tuple notation for UrlGenerator actions #24738

merged 1 commit into from
Jul 4, 2018

Conversation

sebastiandedeyne
Copy link
Contributor

This PR allows you to use a tuple notation for generating action urls. This is especially useful when importing a controller class.

action([FooController::class, 'bar']);

I think it'd make sense to do this in the router too, but that's a but trickier because we'd need to detect if it's an associative array (for ['uses' => '...']) first.

@sisve
Copy link
Contributor

sisve commented Jul 3, 2018

Do we have anything called "tuple notation" in the framework already? This looks like php's builtin callable syntax.

@devcircus
Copy link
Contributor

Seems like this callable syntax was PRd for routes a few weeks ago.

@taylorotwell taylorotwell merged commit 2b3902a into laravel:master Jul 4, 2018
@taylorotwell
Copy link
Member

Send a docs PR to master branch if you don't mind.

@sebastiandedeyne
Copy link
Contributor Author

@sisve The exact name doesn't really matter since it doesn't exist in the code, just this PR title :) "Callable syntax" makes more sense though, if it ends up in the docs I'll write it like that.

@devcircus Thanks for mentioning, will hold off on that then.


Added to my todo list, I'll send a docs PR later this week 👍

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.

4 participants