phplaravellaravel-5.8laravel-nova

Laravel Nova - Reorder left navigation menu items


In default the ordering of left menu items is in alphabetical order.

My client wants to order those menus manually. Any idea how to make it possible?

enter image description here

Go to answer


Solution

  • There are two ways to achieve this:

    1. By setting priority to Resource
    2. Ordering Resource models in NovaServiceProvider

    1. Priority Method

    2. Ordering Resource models in NovaServiceProvider

    In NovaServiceProvider, order Resource models like this:

    protected function resources()
    {
        Nova::resources([
            User::class,
            Post::class,
        ]);
     }