Files
opensem/app/Menu/Shop.php
Ludovic CANDELLIER 516ec2232e [WIP] Add some classes
2020-04-25 01:06:04 +02:00

32 lines
1.3 KiB
PHP

<?php
namespace App\Menu;
use Sebastienheyd\Boilerplate\Menu\Builder;
use App\Repositories\Users;
class Shop
{
public function make(Builder $menu)
{
$menu->add('Commerce', [ 'permission' => 'backend_access', 'icon' => 'shopping-basket' ])
->id('shop')
->activeIfRoute('shop')
->order(1);
$menu->addTo('shop', 'Categories', [ 'route' => 'Shop.Admin.Categories.index', 'permission' => 'backend_access' ])
->activeIfRoute(['Shop.Admin.Categories.*'])->order(1);
$menu->addTo('shop', 'Articles', [ 'route' => 'Shop.Admin.Articles.index', 'permission' => 'backend_access' ])
->activeIfRoute(['Shop.Admin.Articles.*'])->order(2);
$menu->addTo('shop', 'Familles d\'articles', [ 'route' => 'Shop.Admin.ArticleFamilies.index', 'permission' => 'backend_access' ])
->activeIfRoute(['Shop.Admin.ArticleFamilies.*'])->order(3);
$menu->addTo('shop', 'Commandes', [ 'route' => 'Shop.Admin.Orders.index', 'permission' => 'backend_access' ])
->activeIfRoute(['Shop.Admin.Orders.*'])->order(4);
$menu->addTo('shop', 'Factures', [ 'route' => 'Shop.Admin.Invoices.index', 'permission' => 'backend_access' ])
->activeIfRoute(['Shop.Admin.Invoices.*'])->order(5);
}
}