Skip to content

Conversation

lukinovec
Copy link
Contributor

@lukinovec lukinovec commented Aug 13, 2025

Originally, cloning a route would add the tenant parameter after all existing route prefixes. Now, the clone action has the $tenantParameterBeforePrefix property, which is true by default, meaning the tenant parameter gets added before the existing prefixes. This can be customized by calling $cloneAction->tenantParameterBeforePrefix(false) -- that way, the original behavior would be preserved.

For example, this solves the problem with Filament, where the cloned routes would look like /filament/{tenant}/something, which isn't ideal for many reasons (main reason is that the routes would be completely broken and the admin panel routes wouldn't work correctly. The other reason is that for consistency, tenant routes should have the {tenant} parameter before the existing prefixes (but as I mentioned, this is configurable).

…arameterBeforePrefix() to allow customizing this
Copy link

codecov bot commented Aug 13, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.37%. Comparing base (13a2209) to head (d9ee7ca).
⚠️ Report is 2 commits behind head on august.

Additional details and impacted files
@@             Coverage Diff              @@
##             august    #1393      +/-   ##
============================================
+ Coverage     86.34%   86.37%   +0.02%     
- Complexity     1111     1113       +2     
============================================
  Files           178      178              
  Lines          3252     3259       +7     
============================================
+ Hits           2808     2815       +7     
  Misses          444      444              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@stancl
Copy link
Member

stancl commented Aug 27, 2025

@stancl
Copy link
Member

stancl commented Aug 27, 2025

And slightly less related 0f7cd2e

@stancl stancl changed the base branch from master to august September 3, 2025 13:28
@lukinovec lukinovec marked this pull request as ready for review September 3, 2025 13:44
@stancl stancl merged commit d983bf9 into august Sep 3, 2025
8 checks passed
@stancl stancl deleted the tenant-param-before-route-prefix branch September 3, 2025 13:56
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