F
Filamentβ€’16mo ago
Log1x

Using $panel->profile() with normal Page

is there a good way to extend the EditProfile page to bring it into a normal panel page layout? id like to use the ->profile() panel functionality but I get screamed at over route stuff if I pass a normal Page to it and EditProfile its self has some goodies in it for handling saving, etc. so I kind of want to use it. mainly just have too much user profile data to make it look good on the SimplePage layout so getting kind of trolled 😩
5 Replies
Patrick Boivin
Patrick Boivinβ€’16mo ago
Possibly with the static $layout property but I'm not sure if that would cause other issues.
Log1x
Log1xOPβ€’16mo ago
it sort of works using filament-panels::components.layout.index. i need to figure out how to get rid of/change https://i.imgur.com/uT9sJch.png – i see getLabel() but it only changes "Profile", not sure where back is coming from. i assume the EditProfile view
Imgur
Log1x
Log1xOPβ€’16mo ago
nice got it thank you
Andrew Wallo
Andrew Walloβ€’16mo ago
1. Make a regular page for your profile. 2. Use this in your panel:
->userMenuItems([
'profile' => MenuItem::make()
->label('Profile')
->icon('heroicon-o-user-circle')
->url(static fn () => EditProfile::getUrl()) // my custom page
])
->userMenuItems([
'profile' => MenuItem::make()
->label('Profile')
->icon('heroicon-o-user-circle')
->url(static fn () => EditProfile::getUrl()) // my custom page
])
Log1x
Log1xOPβ€’16mo ago
nice find, i just replied with another technique for doing the profile page its self in the other thread weird timing πŸ˜„
Want results from more Discord servers?
Add your server