runlinenl / nova-profile-tool

This package adds a tool for Laravel nova to let a user manage their profile data
MIT License
37 stars 40 forks source link

Nova 4 support? #52

Open scramatte opened 2 years ago

scramatte commented 2 years ago

Hi,

Any chance to get this module compatible with nova 4?

Regards

billyjustal commented 2 years ago

+1

mateusz-peczkowski commented 2 years ago

+1

FrittenKeeZ commented 2 years ago

There's no reason for this in Nova 4 - it can be accomplished by modifying the user menu and setup user policies correctly.

Nova::userMenu(function (Request $request, Menu $menu) {
    $menu->prepend(
        MenuItem::make(
            'Profile',
            "/resources/users/{$request->user()->getKey()}"
        )
    );

    return $menu;
});