winex01/backpack-menu

Laravel backpack menu

1.0.2 2024-09-25 05:43 UTC

This package is auto-updated.

Last update: 2024-10-25 05:57:35 UTC


README

Latest Version on Packagist Total Downloads The Whole Fruit Manifesto

Screenshots

Backpack Menu

Installation

Via Composer

composer require winex01/backpack-menu

Requirements

Please install first winex01/backpack-permission-manager

Usage

After installing winex01/backpack-permission-manager, open RolesAndPermissionsSeeder.php and add this:

//RolesAndPermissionsSeeder.php
protected $rolesAndPermissions = [
    // more arrays here...

    'menus' => [
        'menus_list',
        'menus_create',
        'menus_show',
        'menus_update',
        'menus_delete',
        'menus_reorder',
    ],
];
//menu_items.blade.php
@include('winex01.backpack-menu::menu_items')

migrations

php artisan vendor:publish --provider="Winex01\BackpackMenu\BackpackMenuServiceProvider" --tag="migrations"

// dont forget to run migrate after

seeder

php artisan vendor:publish --provider="Winex01\BackpackMenu\BackpackMenuServiceProvider" --tag="seeders"

run the seeder

php artisan db:seed --class=MenusTableSeeder.php

// or you can add it to default seeder file, DatabaseSeeder.php

Add new menu

  • add menu then add new array in RolesAndPermissionsSeeder.php
  • you must have a permission with suffix _list, example users_list, menus_lists(use plural or table name), bec. the field permission in Menu crud will filter it and pick up only _list
  • run the seeder and that's it.

Change log

Changes are documented here on Github. Please see the Releases tab.

Testing

composer test

Contributing

Please see contributing.md for a todolist and howtos.

Security

If you discover any security related issues, please email winnie131212592@gmail.com instead of using the issue tracker.

Credits

License

This project was released under MIT, so you can install it on top of any Backpack & Laravel project. Please see the license file for more information.

However, please note that you do need Backpack installed, so you need to also abide by its YUMMY License. That means in production you'll need a Backpack license code. You can get a free one for non-commercial use (or a paid one for commercial use) on backpackforlaravel.com.