174 lines
7.0 KiB
PHP
174 lines
7.0 KiB
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use Illuminate\Support\Facades\View;
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
class ViewServiceProvider extends ServiceProvider
|
|
{
|
|
public function boot(): void
|
|
{
|
|
View::composer('*', function ($view) {
|
|
$sidebar = [
|
|
[
|
|
'heading' => 'Dasbor',
|
|
'items' => [
|
|
[
|
|
'label' => 'Ringkasan',
|
|
'icon' => 'squares-plus',
|
|
'route' => 'studio.dashboard.overview',
|
|
'match' => 'studio.dashboard.overview',
|
|
'can' => 'view overview',
|
|
],
|
|
],
|
|
],
|
|
[
|
|
'heading' => 'Master',
|
|
'items' => [
|
|
[
|
|
'label' => 'Outlet',
|
|
'icon' => 'home-modern',
|
|
'route' => 'studio.master.outlet.index',
|
|
'match' => 'studio.master.outlet.*',
|
|
'can' => 'view outlet',
|
|
],
|
|
[
|
|
'label' => 'Pegawai',
|
|
'icon' => 'users',
|
|
'route' => 'studio.master.user.index',
|
|
'match' => 'studio.master.user.*',
|
|
'can' => 'view user',
|
|
],
|
|
[
|
|
'label' => 'Rumus',
|
|
'icon' => 'variable',
|
|
'route' => 'studio.master.formula.index',
|
|
'match' => 'studio.master.formula.*',
|
|
'can' => 'view formula',
|
|
],
|
|
],
|
|
],
|
|
[
|
|
'heading' => 'Loyalty',
|
|
'items' => [
|
|
[
|
|
'label' => 'Tier',
|
|
'icon' => 'star',
|
|
'route' => 'studio.loyalty.tier.index',
|
|
'match' => 'studio.loyalty.tier.*',
|
|
'can' => 'view tier',
|
|
],
|
|
[
|
|
'label' => 'Voucher',
|
|
'icon' => 'ticket',
|
|
'route' => 'studio.loyalty.voucher.index',
|
|
'match' => 'studio.loyalty.voucher.*',
|
|
'can' => 'view voucher',
|
|
],
|
|
[
|
|
'label' => 'Customer',
|
|
'icon' => 'user-plus',
|
|
'route' => 'studio.loyalty.customer.index',
|
|
'match' => 'studio.loyalty.customer.*',
|
|
'can' => 'view customer',
|
|
],
|
|
],
|
|
],
|
|
[
|
|
'heading' => 'Katalog',
|
|
'items' => [
|
|
[
|
|
'label' => 'Kategori',
|
|
'icon' => 'list-bullet',
|
|
'route' => 'studio.catalog.category.index',
|
|
'match' => 'studio.catalog.category.*',
|
|
'can' => 'view category',
|
|
],
|
|
[
|
|
'label' => 'Merek',
|
|
'icon' => 'tag',
|
|
'route' => 'studio.catalog.brand.index',
|
|
'match' => 'studio.catalog.brand.*',
|
|
'can' => 'view brand',
|
|
],
|
|
[
|
|
'label' => 'Parfum',
|
|
'icon' => 'flower-2',
|
|
'route' => 'studio.catalog.perfume.index',
|
|
'match' => 'studio.catalog.perfume.*',
|
|
'can' => 'view perfume',
|
|
],
|
|
[
|
|
'label' => 'Produk',
|
|
'icon' => 'boxes',
|
|
'route' => 'studio.catalog.product.index',
|
|
'match' => 'studio.catalog.product.*',
|
|
'can' => 'view product',
|
|
],
|
|
[
|
|
'label' => 'Botol',
|
|
'icon' => 'beaker',
|
|
'route' => 'studio.catalog.bottle.index',
|
|
'match' => 'studio.catalog.bottle.*',
|
|
'can' => 'view bottle',
|
|
],
|
|
],
|
|
],
|
|
[
|
|
'heading' => 'Keuangan',
|
|
'items' => [
|
|
[
|
|
'label' => 'Pengeluaran',
|
|
'icon' => 'banknote-arrow-down',
|
|
'route' => 'studio.finance.expense.index',
|
|
'match' => 'studio.finance.expense.*',
|
|
'can' => 'view expense',
|
|
],
|
|
[
|
|
'label' => 'Penggajian',
|
|
'icon' => 'hand-coins',
|
|
'route' => 'studio.finance.payroll.index',
|
|
'match' => 'studio.finance.payroll.*',
|
|
'can' => 'view payroll',
|
|
],
|
|
],
|
|
],
|
|
[
|
|
'heading' => 'Kelola',
|
|
'items' => [
|
|
[
|
|
'label' => 'Artikel',
|
|
'icon' => 'newspaper',
|
|
'route' => 'studio.manage.article.index',
|
|
'match' => 'studio.manage.article.*',
|
|
'can' => 'view article',
|
|
],
|
|
[
|
|
'label' => 'Belanja',
|
|
'icon' => 'shopping-bag',
|
|
'route' => 'studio.manage.purchase.index',
|
|
'match' => 'studio.manage.purchase.*',
|
|
'can' => 'view purchase',
|
|
],
|
|
],
|
|
],
|
|
[
|
|
'heading' => 'Pengaturan',
|
|
'items' => [
|
|
[
|
|
'label' => 'Aplikasi',
|
|
'icon' => 'cog-6-tooth',
|
|
'route' => 'studio.setting.application',
|
|
'match' => 'studio.setting.application',
|
|
'can' => 'view application settings',
|
|
],
|
|
],
|
|
],
|
|
];
|
|
|
|
$view->with('sidebar', $sidebar);
|
|
});
|
|
}
|
|
}
|