Skip to content

Commit

Permalink
删除某些菜单
Browse files Browse the repository at this point in the history
  • Loading branch information
tu6ge committed Feb 2, 2020
1 parent 3fe208c commit 2d966b0
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 81 deletions.
90 changes: 45 additions & 45 deletions database/seeders/ChineseTableSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,51 +79,51 @@ public function run(){
'order' => 2,
])->save();
}
$menuItem = MenuItem::firstOrNew([
'menu_id' => $menu_id,
'title' => __('文章'),
'url' => '',
'route' => 'voyager.posts.index',
]);
if (!$menuItem->exists) {
$menuItem->fill([
'target' => '_self',
'icon_class' => 'voyager-news',
'color' => null,
'parent_id' => null,
'order' => 2,
])->save();
}
$menuItem = MenuItem::firstOrNew([
'menu_id' => $menu_id,
'title' => __('页面'),
'url' => '',
'route' => 'voyager.pages.index',
]);
if (!$menuItem->exists) {
$menuItem->fill([
'target' => '_self',
'icon_class' => 'voyager-file-text',
'color' => null,
'parent_id' => null,
'order' => 2,
])->save();
}
$menuItem = MenuItem::firstOrNew([
'menu_id' => $menu_id,
'title' => __('分类'),
'url' => '',
'route' => 'voyager.categories.index',
]);
if (!$menuItem->exists) {
$menuItem->fill([
'target' => '_self',
'icon_class' => 'voyager-categories',
'color' => null,
'parent_id' => null,
'order' => 2,
])->save();
}
// $menuItem = MenuItem::firstOrNew([
// 'menu_id' => $menu_id,
// 'title' => __('文章'),
// 'url' => '',
// 'route' => 'voyager.posts.index',
// ]);
// if (!$menuItem->exists) {
// $menuItem->fill([
// 'target' => '_self',
// 'icon_class' => 'voyager-news',
// 'color' => null,
// 'parent_id' => null,
// 'order' => 2,
// ])->save();
// }
// $menuItem = MenuItem::firstOrNew([
// 'menu_id' => $menu_id,
// 'title' => __('页面'),
// 'url' => '',
// 'route' => 'voyager.pages.index',
// ]);
// if (!$menuItem->exists) {
// $menuItem->fill([
// 'target' => '_self',
// 'icon_class' => 'voyager-file-text',
// 'color' => null,
// 'parent_id' => null,
// 'order' => 2,
// ])->save();
// }
// $menuItem = MenuItem::firstOrNew([
// 'menu_id' => $menu_id,
// 'title' => __('分类'),
// 'url' => '',
// 'route' => 'voyager.categories.index',
// ]);
// if (!$menuItem->exists) {
// $menuItem->fill([
// 'target' => '_self',
// 'icon_class' => 'voyager-categories',
// 'color' => null,
// 'parent_id' => null,
// 'order' => 2,
// ])->save();
// }

$toolsMenuItem = MenuItem::firstOrNew([
'menu_id' => $menu_id,
Expand Down
36 changes: 0 additions & 36 deletions resources/vievs/sidebar.blade.php

This file was deleted.

0 comments on commit 2d966b0

Please sign in to comment.