The platform panel menu is an important element of the graphical user interface because it is the main navigation through the project.

Usage example

The default menu registration takes place in the app/Orchid/PlatformProvider.php:

namespace App\Orchid;

use Orchid\Screen\Actions\Menu;
use Orchid\Platform\OrchidServiceProvider;

class PlatformProvider extends OrchidServiceProvider
    // ...

    public function registerMainMenu(): array
        return [

The methods registerMainMenu and registerProfileMenu must return the menu items that are required to be displayed.


Let's look at an example. Initially we create an Menu object, setting various parameters, and then add the item to a specific place. There are several such places:

  • registerMainMenu - The menu is displayed on each page on the left side.
  • registerProfileMenu - The menu displayed when you click on the profile.

Note. for each element during creation, the unique key which cannot repeat is generated, but it can be changed manually by means of the slug method.


Reference Reference:

use Orchid\Screen\Actions\Menu;


Specifying a link through the route:


To determine the link activity, use the dwightwatson/active package Link activity, when using route and url is set automatically, but it is acceptable to change with the help of explicit instructions:





Quite an expected situation when some links should be missing depending on the availability of rights or other circumstances, for this:


or any other check returning a boolean value:



For a menu item, you can specify a graphic icon with:


It is also possible to integrate into a visual group by setting the title for the first element:


Display order

Sorting set by setting the sequence number:


Badge notifications

Menu items have the ability to notify the user about any events in the form of a numerical value, for this:

    ->badge(function () {
        return 10;

Nested menu

You can specify a single-level submenu as follows:

Menu::make('Dropdown menu')
        Menu::make('Sub element item 1')->icon('bag')->sort(2),
        Menu::make('Sub element item 2')->icon('heart')->sort(0),

To create a submenu dynamic, you need to add the main item and specify its unique name using the slug method. Then you can add other elements to the new item.

Menu::make('Dropdown menu')
        Menu::make('Sub element item 1')->icon('bag'),
        Menu::make('Sub element item 2')->icon('heart'),

And then add new items in our own packages like:

use Orchid\Support\Facades\Dashboard;

Dashboard::addMenuSubElements(Dashboard::MENU_MAIN, 'sub-menu', [
    Menu::make('Sub element item 3')->icon('badge')