Making tabs for edit page

There used to be a package for version 2: https://github.com/aymanalhattami/filament-page-with-sidebar Unfortunately doesn't support V3 yet (there's a push for it, but in testing, it doesn't work). I see issues reported for that, but for now, is there a Filament way to do some kinda tabs like that plugin does? On the edit page, there will be the edit form and the relationship manager table under that I want to move them into tabs, where you select a tab to view those My example: Litters (resource) has Puppies (relationship manager) I would like tabs where you can edit the litter, or just view the puppies - within the same LittersResource, so you don't scroll down to see Puppies, you just select the tab... Maybe this isn't possible... let me know πŸ™‚
7 Replies
yagrasdemonde
yagrasdemondeβ€’17mo ago
Did you try custom action in place of tabs ?
JamesTechDude
JamesTechDudeOPβ€’17mo ago
That might be the way to go πŸ€” and just put the relationship manager onto its own page? I made a view action using: php artisan make:filament-page ViewLitter --resource=LitterResource --type=ViewRecord But the problem is, this still generates the form at the top - just with a view only type / disabled fields, with no way to hide it that I can find in the documentation I'll try messing around further
tuto1902
tuto1902β€’17mo ago
Try this function in your ViewLitter page (can also be used in the EditLitter page)
public function hasCombinedRelationManagerTabsWithContent(): bool
{
return true;
}
public function hasCombinedRelationManagerTabsWithContent(): bool
{
return true;
}
JamesTechDude
JamesTechDudeOPβ€’17mo ago
THAT WORKS! Thank you!
tuto1902
tuto1902β€’17mo ago
You're welcome! I'm glad I was able to help πŸ‘
JamesTechDude
JamesTechDudeOPβ€’17mo ago
Sadly I decided to go away from Filament 😦 it's very nice, but I have very custom pages and would have to learn custom page logic to get those to work again haha. But it was fun to play with! I may bug you in the Laravel section someday soon tho πŸ˜…
tuto1902
tuto1902β€’17mo ago
That's OK. If your Filament doesn't fit your design, the you must find what works best for you. I'll be happy to answer any Laravel questions you have.
Want results from more Discord servers?
Add your server