Skip to content
This repository has been archived by the owner on Sep 28, 2019. It is now read-only.

Commit

Permalink
Merge pull request #11 from avored/dev
Browse files Browse the repository at this point in the history
updated composer and Provider AdminMenu Add Method change
  • Loading branch information
indpurvesh authored Jun 27, 2018
2 parents be2c43d + 0dd5ad0 commit 821067d
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 38 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"barryvdh/laravel-dompdf": "0.8.*",
"laravel/passport": "5.0.*",
"stripe/stripe-php": "^6.3",
"avored/framework": "~1.8"
"avored/framework": "~1.5"
},
"autoload": {
"classmap": [
Expand Down
79 changes: 42 additions & 37 deletions src/Provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
use AvoRed\Ecommerce\Models\Repository\PageRepository;
use AvoRed\Ecommerce\Models\Repository\RoleRepository;
use AvoRed\Ecommerce\Models\Repository\SiteCurrencyRepository;
use AvoRed\Framework\Breadcrumb\Breadcrumb;

class Provider extends ServiceProvider
{
Expand Down Expand Up @@ -170,10 +171,11 @@ public function registerPassportResources()
*/
protected function registerAdminMenu()
{
AdminMenuFacade::add('shop')
->label('Shop')
->route('#')
->icon('fas fa-cart-plus');
AdminMenuFacade::add('shop', function(AdminMenu $shopMenu) {
$shopMenu->label('Shop')
->route('#')
->icon('fas fas-cart-plus');
});

$shopMenu = AdminMenuFacade::get('shop');

Expand Down Expand Up @@ -212,10 +214,11 @@ protected function registerAdminMenu()
->icon('fas fa-dollar-sign');
$shopMenu->subMenu('order', $orderMenu);

AdminMenuFacade::add('cms')
->label('CMS')
->route('#')
->icon('fas fa-building');
AdminMenuFacade::add('cms',function(AdminMenu $cmsMenu) {
$cmsMenu->label('CMS')
->route('#')
->icon('fas fa-building');
});

$cmsMenu = AdminMenuFacade::get('cms');

Expand All @@ -232,10 +235,12 @@ protected function registerAdminMenu()
->icon('fas fa-leaf');
$cmsMenu->subMenu('menu', $frontMenu);

AdminMenuFacade::add('system')
->label('System')
->route('#')
->icon('fas fa-cogs');
AdminMenuFacade::add('system', function(AdminMenu $systemMenu) {
$systemMenu->label('System')
->route('#')
->icon('fas fa-cogs');
});

$systemMenu = AdminMenuFacade::get('system');

$configurationMenu = new AdminMenu();
Expand Down Expand Up @@ -413,140 +418,140 @@ protected function registerAdminConfiguration()
*/
protected function registerBreadcrumb()
{
BreadcrumbFacade::make('admin.dashboard', function ($breadcrumb) {
BreadcrumbFacade::make('admin.dashboard', function (Breadcrumb $breadcrumb) {
$breadcrumb->label('Dashboard');
});

BreadcrumbFacade::make('admin.product.index', function ($breadcrumb) {
BreadcrumbFacade::make('admin.product.index', function (Breadcrumb $breadcrumb) {
$breadcrumb->label('Product')
->parent('admin.dashboard');
});

BreadcrumbFacade::make('admin.product.create', function ($breadcrumb) {
BreadcrumbFacade::make('admin.product.create', function (Breadcrumb $breadcrumb) {
$breadcrumb->label('Create')
->parent('admin.dashboard')
->parent('admin.product.index');
});

BreadcrumbFacade::make('admin.product.edit', function ($breadcrumb) {
BreadcrumbFacade::make('admin.product.edit', function (Breadcrumb $breadcrumb) {
$breadcrumb->label('Edit')
->parent('admin.dashboard')
->parent('admin.product.index');
});

BreadcrumbFacade::make('admin.attribute.index', function ($breadcrumb) {
BreadcrumbFacade::make('admin.attribute.index', function (Breadcrumb $breadcrumb) {
$breadcrumb->label('Attribute')
->parent('admin.dashboard');
});

BreadcrumbFacade::make('admin.attribute.create', function ($breadcrumb) {
BreadcrumbFacade::make('admin.attribute.create', function (Breadcrumb $breadcrumb) {
$breadcrumb->label('Create')
->parent('admin.dashboard')
->parent('admin.attribute.index');
});

BreadcrumbFacade::make('admin.attribute.edit', function ($breadcrumb) {
BreadcrumbFacade::make('admin.attribute.edit', function (Breadcrumb $breadcrumb) {
$breadcrumb->label('Edit')
->parent('admin.dashboard')
->parent('admin.attribute.index');
});

BreadcrumbFacade::make('admin.property.index', function ($breadcrumb) {
BreadcrumbFacade::make('admin.property.index', function (Breadcrumb $breadcrumb) {
$breadcrumb->label('Property')
->parent('admin.dashboard');
});

BreadcrumbFacade::make('admin.property.create', function ($breadcrumb) {
BreadcrumbFacade::make('admin.property.create', function (Breadcrumb $breadcrumb) {
$breadcrumb->label('Create')
->parent('admin.dashboard')
->parent('admin.property.index');
});

BreadcrumbFacade::make('admin.attribute.edit', function ($breadcrumb) {
BreadcrumbFacade::make('admin.attribute.edit', function (Breadcrumb $breadcrumb) {
$breadcrumb->label('Edit')
->parent('admin.dashboard')
->parent('admin.attribute.index');
});

BreadcrumbFacade::make('admin.order.index', function ($breadcrumb) {
BreadcrumbFacade::make('admin.order.index', function (Breadcrumb $breadcrumb) {
$breadcrumb->label('Order')
->parent('admin.dashboard');
});

BreadcrumbFacade::make('admin.order.view', function ($breadcrumb) {
BreadcrumbFacade::make('admin.order.view', function (Breadcrumb $breadcrumb) {
$breadcrumb->label('View')
->parent('admin.dashboard')
->parent('admin.order.index');
});

BreadcrumbFacade::make('admin.theme.index', function ($breadcrumb) {
BreadcrumbFacade::make('admin.theme.index', function (Breadcrumb $breadcrumb) {
$breadcrumb->label('Theme')
->parent('admin.dashboard');
});

BreadcrumbFacade::make('admin.theme.create', function ($breadcrumb) {
BreadcrumbFacade::make('admin.theme.create', function (Breadcrumb $breadcrumb) {
$breadcrumb->label('Upload')
->parent('admin.dashboard')
->parent('admin.theme.index');
});

BreadcrumbFacade::make('admin.role.index', function ($breadcrumb) {
BreadcrumbFacade::make('admin.role.index', function (Breadcrumb $breadcrumb) {
$breadcrumb->label('Role')
->parent('admin.dashboard');
});

BreadcrumbFacade::make('admin.role.create', function ($breadcrumb) {
BreadcrumbFacade::make('admin.role.create', function (Breadcrumb $breadcrumb) {
$breadcrumb->label('Create')
->parent('admin.dashboard')
->parent('admin.role.index');
});

BreadcrumbFacade::make('admin.role.edit', function ($breadcrumb) {
BreadcrumbFacade::make('admin.role.edit', function (Breadcrumb $breadcrumb) {
$breadcrumb->label('Edit')
->parent('admin.dashboard')
->parent('admin.role.index');
});

BreadcrumbFacade::make('admin.admin-user.index', function ($breadcrumb) {
BreadcrumbFacade::make('admin.admin-user.index', function (Breadcrumb $breadcrumb) {
$breadcrumb->label('Admin User')
->parent('admin.dashboard');
});

BreadcrumbFacade::make('admin.admin-user.create', function ($breadcrumb) {
BreadcrumbFacade::make('admin.admin-user.create', function (Breadcrumb $breadcrumb) {
$breadcrumb->label('Create')
->parent('admin.dashboard')
->parent('admin.admin-user.index');
});

BreadcrumbFacade::make('admin.admin-user.edit', function ($breadcrumb) {
BreadcrumbFacade::make('admin.admin-user.edit', function (Breadcrumb $breadcrumb) {
$breadcrumb->label('Edit')
->parent('admin.dashboard')
->parent('admin.admin-user.index');
});

BreadcrumbFacade::make('admin.admin-user.show', function ($breadcrumb) {
BreadcrumbFacade::make('admin.admin-user.show', function (Breadcrumb $breadcrumb) {
$breadcrumb->label('Show')
->parent('admin.dashboard')
->parent('admin.admin-user.index');
});

BreadcrumbFacade::make('admin.configuration', function ($breadcrumb) {
BreadcrumbFacade::make('admin.configuration', function (Breadcrumb $breadcrumb) {
$breadcrumb->label('Configuration')
->parent('admin.dashboard');
});

BreadcrumbFacade::make('admin.category.index', function ($breadcrumb) {
BreadcrumbFacade::make('admin.category.index', function (Breadcrumb $breadcrumb) {
$breadcrumb->label('Category')
->parent('admin.dashboard');
});

BreadcrumbFacade::make('admin.category.create', function ($breadcrumb) {
BreadcrumbFacade::make('admin.category.create', function (Breadcrumb $breadcrumb) {
$breadcrumb->label('Create')
->parent('admin.dashboard')
->parent('admin.category.index');
});

BreadcrumbFacade::make('admin.category.edit', function ($breadcrumb) {
BreadcrumbFacade::make('admin.category.edit', function (Breadcrumb $breadcrumb) {
$breadcrumb->label('Edit')
->parent('admin.dashboard')
->parent('admin.category.index');
Expand Down

0 comments on commit 821067d

Please sign in to comment.