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
yeah, it would help me too, maybe someone could
(up)
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.
actually thank you very much, I have already done the fork, I have some bugs about getting the route parameters from livewire
GitHub
GitHub - laraxot/filament-nested-resources at master
Contribute to laraxot/filament-nested-resources development by creating an account on GitHub.
Sounds good, I'll have a look tomorrow
thanks 🙂
What is the issue exactly?
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.
I'm not sure.. I don't think
Route::current()
can be used reliably in this context.also in original
https://github.com/Sevendays-Digital/filament-nested-resources/blob/main/src/ResourcePages/NestedPage.php
GitHub
filament-nested-resources/src/ResourcePages/NestedPage.php at main ...
Contribute to Sevendays-Digital/filament-nested-resources development by creating an account on GitHub.
I think this is different. Resource vs. Page
GitHub
filament-nested-resources/src/NestedResource.php at main · Sevenday...
Contribute to Sevendays-Digital/filament-nested-resources development by creating an account on GitHub.
there is in both ..
Ok
ok now is working with morph relation too
find any solution for route:current ?
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.
Of course, I was just asking if you had thought about how you could fix that
ok thanks
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?