Menu

Estimated reading: 1 minute

The left sidebar of Akaunting contains the company switcher and menu. We use the akaunting/laravel-menu package as builder.

You may want to extend the menu by adding your own pages. You should listen to the AdminCreated event for admin and/or PortalCreated for client sides.

Here is a listener example:

<?php

namespace Modules\MyBlog\Listeners;

use App\Events\Menu\AdminCreated as Event;

class AddToAdminMenu
{
    public function handle(Event $event): void
    {
        // Add child to existing menu item
        $item = $event->menu->whereTitle(trans_choice('general.sales', 2));
        $item->route('my-blog.posts.index', trans('my-blog::general.posts'), [], 4, ['icon' => '']);

        // Add new menu item
        $event->menu->add([
            'route' => ['my-blog.posts.index', []],
            'title' => trans('my-blog::general.posts'),
            'icon' => 'edit',
            'order' => 15,
        ]);
    }
}

Menu documentation can help to understand the system, especially about how to find a menu item, add child ones, and create dropdown menus.

Icons

Akaunting ships with the following icon packs:

If you’re going to use any brand icon, you should add simple-icons- prefix to the icon name. Example:

simple-icons-paypal
Share this Doc

Menu

Or copy link

CONTENTS