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] Allow for fluent registration of Route Resources to return a RouteCollection #23890

Conversation

DanielCoulbourne
Copy link
Contributor

@DanielCoulbourne DanielCoulbourne commented Apr 16, 2018

This PR allows for manual Registration of fluent Route Resource chains (which currently remain as a PendingResourceRegistration until destruction.

Now upon registration they return a RouteCollection like so:

Route::resource('photos', 'PhotoController')->register() // Returns a RouteCollection

The ResourceRegistrar::register() method previously returned void but based on the fact that it's not publicly accessible, I don't think this should be considered a breaking change 🤞

While I recognize that this PR probably doesn't add a ton of value to the community at large, it won't make anyone's life worse and will make my life much nicer 😄

@DanielCoulbourne DanielCoulbourne force-pushed the cause-resource-registrar-to-return-a-route-collection branch 2 times, most recently from c46a456 to 368fd25 Compare April 16, 2018 09:07
@DanielCoulbourne DanielCoulbourne force-pushed the cause-resource-registrar-to-return-a-route-collection branch from 368fd25 to 4ba828b Compare April 16, 2018 09:08
@DanielCoulbourne DanielCoulbourne changed the title Cause ResourceRegistrar::register() to return a RouteCollection. Allow for fluent registration of Route Resources to return a RouteCollection Apr 16, 2018
@taylorotwell taylorotwell merged commit 4ba828b into laravel:5.6 Apr 16, 2018
@GrahamCampbell GrahamCampbell changed the title Allow for fluent registration of Route Resources to return a RouteCollection [5.6] Allow for fluent registration of Route Resources to return a RouteCollection Apr 16, 2018
@sisve
Copy link
Contributor

sisve commented Apr 16, 2018

[...] based on the fact that it's not publicly accessible [...]

All the methods you've changed are public. How is this not publicly accessible?

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.

None yet

3 participants