laravel / nova-issues

556 stars 34 forks source link

Feature Request: Please add User Profile edit in user menu near to Log out #1584

Closed wemersonrv closed 5 years ago

wemersonrv commented 5 years ago

Hello,

Please add User Profile feature, so logged users can update their own stored data, without access it in User resource, and in this profile we can decide if we will remove password field from profile.

How do you think about it ?

This feature can be added in user Menu near to Logout Menu.

bolechen commented 5 years ago

u can modify user.blade.php self like this

        <li>
            <router-link :to="{
                name: 'detail',
                params: {
                    resourceName: 'members',
                    resourceId: '{{ $user->id }}'
                }
            }" class="block no-underline text-90 hover:bg-30 p-3">
            Profile
            </router-link>
        </li>
wemersonrv commented 5 years ago

u can modify user.blade.php self like this

        <li>
            <router-link :to="{
                name: 'detail',
                params: {
                    resourceName: 'members',
                    resourceId: '{{ $user->id }}'
                }
            }" class="block no-underline text-90 hover:bg-30 p-3">
            Profile
            </router-link>
        </li>

Tx my friend. It works.

wemersonrv commented 5 years ago

Tx my friend. It works.

JoshMoreno commented 5 years ago

Little correction for out of the box laravel - change members to users

<li>
    <router-link :to="{
        name: 'detail',
        params: {
            resourceName: 'users',
            resourceId: '{{ $user->id }}'
        }
    }" class="block no-underline text-90 hover:bg-30 p-3">
        Profile
    </router-link>
</li>
jonmenard commented 4 months ago

You can now use the NovaServiceProvider to customize the user menu:

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