Comments (7)
Hi, thanks a lot for the bug report! I'll try to work on a fix as soon as I can. You're also welcome to make a PR if you want.
from filament-nested-resources.
@lukas-frey nice work on the plugin, it is super helpful. Had a question about the route names. Looks like the parameters from the route slug are not being removed. Using the example from this issue, they appear like this
admin.projects.{projectRecord?}.project-sp-natures.{project sp natureRecord?}.building-blocks.create
when normally I believe they are like this
admin.projects.project-sp-natures.building-blocks.create
Just wondering if this was by design or if it might change in future releases.
from filament-nested-resources.
@acepoblete Great catch! It's not by design, I didn't really know it did that until now. Are you actually interacting directly with these slugs in your app?
I will fix it in the next release.
from filament-nested-resources.
I can confirm @niccolofavari 's report. My parent resource is named JobCampaign
, which results in the route admin/job-campaigns/{job campaignRecord?}/child-resource/{record}
and produces a 404.
I believe the root cause is using Filament's get_model_label
helper in this package's get_model_route_parameter
helper, which produces a space-separated version of the model class name. I assume that the Filament helper get_model_label
is intended for UI/display labels, and not for route parameters. I'll look into possible fixes as well :-)
from filament-nested-resources.
@acepoblete Great catch! It's not by design, I didn't really know it did that until now. Are you actually interacting directly with these slugs in your app?
I will fix it in the next release.
I have a custom tab component for navigating between child resources. It's not very smart, so I have to manually generate the URLs for each tab. I noticed that route parameters when trying to figure out what route names to use for the child resources. I'll have a PR for this fix shortly.
moved this to issue #5
from filament-nested-resources.
🎉 This issue has been resolved in version 1.0.0-alpha.6 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀
from filament-nested-resources.
Related Issues (13)
- [Bug]: not working with SLUG keyed models HOT 2
- [Bug]: Global search on root resources throws exception HOT 3
- [Bug]: Create modal causes route not found error HOT 2
- [Bug]: Incorrect urls generated when primaryKey is not "id" HOT 5
- [Bug]: getTableQuery in list view of child resources are not filtered. HOT 5
- [Bug]: Looks like no support for manyToMany HOT 2
- [Bug]: ForceDeleteAction generates error on NestedEditRecord class HOT 1
- [Bug]: When view is enabled the breadcrumbs link is still to edit page... HOT 2
- [Bug]: Error when using morph relation HOT 1
- [Bug]: getRelationship() using getModelLabel() HOT 1
- [Bug]: route params are not removed from the name of the route.
- [Bug]: page actions are missing route params HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from filament-nested-resources.