first upload all files
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
$item->item(trans('$LOWERCASE_MODULE_NAME$::$PLURAL_SNAKE_CASE_ENTITY_NAME$.$PLURAL_SNAKE_CASE_ENTITY_NAME$'), function (Item $item) {
|
||||
$item->weight(5);
|
||||
$item->route('admin.$PLURAL_SNAKE_CASE_ENTITY_NAME$.index');
|
||||
$item->authorize(
|
||||
$this->auth->hasAccess('admin.$PLURAL_SNAKE_CASE_ENTITY_NAME$.index')
|
||||
);
|
||||
});
|
||||
|
||||
// append
|
||||
26
app/Scaffold/Module/stubs/sidebar/sidebar-extender.stub
Normal file
26
app/Scaffold/Module/stubs/sidebar/sidebar-extender.stub
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\$MODULE_NAME$\Sidebar;
|
||||
|
||||
use Maatwebsite\Sidebar\Menu;
|
||||
use Maatwebsite\Sidebar\Item;
|
||||
use Maatwebsite\Sidebar\Group;
|
||||
use Modules\Admin\Sidebar\BaseSidebarExtender;
|
||||
|
||||
class SidebarExtender extends BaseSidebarExtender
|
||||
{
|
||||
public function extend(Menu $menu)
|
||||
{
|
||||
$menu->group(trans('admin::sidebar.content'), function (Group $group) {
|
||||
$group->item(trans('$LOWERCASE_MODULE_NAME$::$PLURAL_SNAKE_CASE_ENTITY_NAME$.$PLURAL_SNAKE_CASE_ENTITY_NAME$'), function (Item $item) {
|
||||
$item->icon('fa fa-copy');
|
||||
$item->weight(0);
|
||||
$item->authorize(
|
||||
/* append */
|
||||
);
|
||||
|
||||
// append
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user