F
Filament7mo ago
IWBW

Profile view and profile edit

How do I make the current user profile link go to the current user's profile page and add a different link for editing the current user's profile?
8 Replies
lazydog
lazydog7mo ago
In your filament service provider, please add ->profile()
IWBW
IWBWOP7mo ago
->profile() is already there, but it goes to a page for editing the profile. It works like Jetstream or Breeze. That's not what I want. I want the "profile" link to go to a view profile page where I will have a link to go to an edit profile page.
Kaesa Lyrih
Kaesa Lyrih7mo ago
Try to custom page ->profile(page: CustomPageViewProfile::class)
IWBW
IWBWOP7mo ago
Tried that, but now I get this error: Route [filament.admin.auth.profile] not defined. Apparently, the route is disappearing when I do that
Kaesa Lyrih
Kaesa Lyrih7mo ago
Medium
Personalizing the Filament Profile Page: Expanding the Design and I...
Filament 3 offers intuitive authentication features, just like the Profile page. However, its design closely resembles the…
IWBW
IWBWOP7mo ago
Thanks. I'll try that some other time. I've already spent a lot of time on a feature I'm not sure people will be using often
Vp
Vp7mo ago
You can read more here https://filamentphp.com/docs/3.x/panels/navigation#customizing-the-profile-link You can do something like:
use App\Filament\Pages\Profile;

$panel
->userMenuItems([
'profile' => MenuItem::make('profile')
->url(fn (): string => Profile::getUrl()),
])
use App\Filament\Pages\Profile;

$panel
->userMenuItems([
'profile' => MenuItem::make('profile')
->url(fn (): string => Profile::getUrl()),
])
Use ->profile() to go to current profile page and follow this to link to "edit" page https://filamentphp.com/docs/3.x/panels/navigation#customizing-the-user-menu
IWBW
IWBWOP7mo ago
This is what I've done to make a third party profile editing plugin work. When I tried it with my own page, it complained that the route was missing. I'll have a look later Sounds like a plan. Will try later. Thank you
Want results from more Discord servers?
Add your server