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

Support Laravel Folio #733

Merged
merged 15 commits into from
May 16, 2024
Merged

Support Laravel Folio #733

merged 15 commits into from
May 16, 2024

Conversation

bakerkretzmar
Copy link
Collaborator

@bakerkretzmar bakerkretzmar commented Mar 20, 2024

This PR adds support for Laravel Folio. Closes #732.

Laravel Folio registers its routes very differently from how Laravel usually handles routes, so unfortunately this is a bit messy. We're more or less doing what Folio's ListCommand is doing, modified for our needs.

Notes:

  • We only deal with named Folio routes.
  • Folio includes the (undocumented) ability to specify a custom view data variable name for a route parameter (e.g. https://github.com/laravel/folio/blob/master/tests/Unit/ModelBindingTest.php#L114). Ziggy will use these custom view data variable names as the route parameter names if they're present, because this is what Folio does internally and we would have to anyway so that we avoid duplicate parameter names.

@bakerkretzmar bakerkretzmar self-assigned this Mar 20, 2024
@bakerkretzmar bakerkretzmar marked this pull request as ready for review March 21, 2024 20:58
@bakerkretzmar bakerkretzmar merged commit 05077b4 into 2.x May 16, 2024
16 checks passed
@bakerkretzmar bakerkretzmar deleted the folio branch May 16, 2024 19:30
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.

This package does not work with Folio named routes
1 participant