nested resource

can you help me converting https://github.com/Sevendays-Digital/filament-nested-resources into filament 3 Please ?
GitHub
GitHub - Sevendays-Digital/filament-nested-resources
Contribute to Sevendays-Digital/filament-nested-resources development by creating an account on GitHub.
19 Replies
malebestia.
malebestia.14mo ago
yeah, it would help me too, maybe someone could
marco76tv
marco76tvOP14mo ago
(up)
Patrick Boivin
Patrick Boivin14mo ago
I don't want to sound rude but I think your first step is to fork the repository on Github and start working. If you get stuck, you can ask more specific questions. I'll do my best to help.
marco76tv
marco76tvOP14mo ago
actually thank you very much, I have already done the fork, I have some bugs about getting the route parameters from livewire
marco76tv
marco76tvOP14mo ago
GitHub
GitHub - laraxot/filament-nested-resources at master
Contribute to laraxot/filament-nested-resources development by creating an account on GitHub.
Patrick Boivin
Patrick Boivin14mo ago
Sounds good, I'll have a look tomorrow
marco76tv
marco76tvOP14mo ago
thanks 🙂
Patrick Boivin
Patrick Boivin14mo ago
What is the issue exactly?
marco76tv
marco76tvOP14mo ago
there are many .. on the file https://github.com/laraxot/filament-nested-resources/blob/master/src/NestedResource.php Route::current() became null .. so i try to use Session .. but there has to be a better solution
GitHub
filament-nested-resources/src/NestedResource.php at master · laraxo...
Contribute to laraxot/filament-nested-resources development by creating an account on GitHub.
Patrick Boivin
Patrick Boivin14mo ago
I'm not sure.. I don't think Route::current() can be used reliably in this context.
marco76tv
marco76tvOP14mo ago
GitHub
filament-nested-resources/src/ResourcePages/NestedPage.php at main ...
Contribute to Sevendays-Digital/filament-nested-resources development by creating an account on GitHub.
Patrick Boivin
Patrick Boivin14mo ago
I think this is different. Resource vs. Page
marco76tv
marco76tvOP14mo ago
marco76tv
marco76tvOP14mo ago
there is in both ..
Patrick Boivin
Patrick Boivin14mo ago
Ok
marco76tv
marco76tvOP14mo ago
ok now is working with morph relation too find any solution for route:current ?
Patrick Boivin
Patrick Boivin14mo ago
Sorry, just to be clear - I can't really work on this with you. I can only brainstorm with you if you need it. Feel free to ask me questions about the things you are trying.
marco76tv
marco76tvOP14mo ago
Of course, I was just asking if you had thought about how you could fix that ok thanks
Patrick Boivin
Patrick Boivin14mo ago
Regarding Route::current(), I'm not sure I understand the full context but from my own experience, you can't always rely on it in the context of a Resource. I'm not exactly sure why the original package is using it that way. Usually, I would handle anything that has to do with route or request in the mount() method of a page. Get what you need from the route or request and store it in a public property on the Livewire component. That way, it will persist between all the AJAX calls that happen behind the scenes. My guess is that Route::current() returns null because it's called outside of the main context of the page. Does that make sense? Do you think I'm missing something?
Want results from more Discord servers?
Add your server