Skip to main content
The Control Panel navigation is highly customizable. You can add your own sections, pages, and subpages, as well as remove and modify existing ones. The navigation is controlled by the shopper/sidebar package. This package can be used both as a standalone sidebar builder for any Laravel application or to extend Shopper’s admin panel.

Sidebar Package Overview

Learn about the sidebar package architecture and features.

Extending Shopper Navigation

Add custom menu items to the Shopper admin panel.

Standalone Installation

Use the sidebar package in any Laravel application.

Configuration

Configure caching, dimensions, and behavior.

Quick Start

To add navigation items to Shopper, create a sidebar extension class and register it in your service provider:
namespace App\Sidebar;

use Shopper\Sidebar\AbstractAdminSidebar;
use Shopper\Sidebar\Contracts\Builder\Group;
use Shopper\Sidebar\Contracts\Builder\Item;
use Shopper\Sidebar\Contracts\Builder\Menu;

class BlogSidebar extends AbstractAdminSidebar
{
    public function extendWith(Menu $menu): Menu
    {
        $menu->group(__('Blog'), function (Group $group): void {
            $group->weight(5);
            $group->setAuthorized();

            $group->item(__('Posts'), function (Item $item): void {
                $item->weight(1);
                $item->setAuthorized();
                $item->useSpa();
                $item->route('shopper.blog.posts.index');
                $item->setIcon('untitledui-file-02');
            });
        });

        return $menu;
    }
}
Register it in your AppServiceProvider:
namespace App\Providers;

use App\Sidebar\BlogSidebar;
use Illuminate\Support\ServiceProvider;
use Shopper\Sidebar\SidebarBuilder;

class AppServiceProvider extends ServiceProvider
{
    public function register(): void
    {
        $this->app['events']->listen(SidebarBuilder::class, BlogSidebar::class);
    }
}
Make sure to register the listener in the register() method, not boot(), to ensure it’s registered before the sidebar is built.

API Reference

For a complete API reference, see the detailed documentation:
ComponentDescriptionDocumentation
MenuRoot container for groupsStandalone Guide
GroupCollection of related itemsStandalone Guide
ItemNavigation entry with icon, badge, etc.Standalone Guide
BadgeNotification indicatorStandalone Guide
AppendAction buttonStandalone Guide