Skip to content

Commit 6e3c8fa

Browse files
init (#80)
1 parent fb2f92c commit 6e3c8fa

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

README.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
[![Quality Score][ico-code-quality]][link-code-quality]
88
[![Total Downloads][ico-downloads]][link-downloads]
99

10-
An admin panel for menu items on Laravel 5 or Laravel 6, using [Backpack\CRUD](https://github.com/Laravel-Backpack/crud). Add, edit, reorder, nest, rename menu items and link them to [Backpack\PageManager](https://github.com/Laravel-Backpack/pagemanager) pages, external link or custom internal link.
10+
An admin panel for menu items on Laravel 5 or Laravel 6, using [Backpack\CRUD](https://github.com/Laravel-Backpack/crud). Add, edit, reorder, nest, rename menu items and link them to [Backpack\PageManager](https://github.com/Laravel-Backpack/pagemanager) pages, external link or custom internal link.
1111

1212
Usually used for front-end menus, not back-end. Adding a menu item in MenuCRUD will not add an item in the admin sidebar, though you can easily customize Backpack\Base's ```sidebar.blade.php``` to show all menu items in the db, if you'd like.
1313

@@ -39,7 +39,7 @@ The only PRO of installing it as a package is that you may benefit from updates.
3939

4040
2) Paste the 'app' and 'database' folders over your projects (merge them). No file overwrite warnings should come up.
4141

42-
3) Copy the `page_or_link.blade.php` file located in 'resources/views/fields' folder to your project's 'resources/views/vendor/backpack/crud/fields' folder. No file overwrite warnings should come up.
42+
3) Copy the `page_or_link.blade.php` file located in 'resources/views/fields' folder to your project's 'resources/views/vendor/backpack/crud/fields' folder. No file overwrite warnings should come up.
4343

4444
4) Replace all mentions of 'Backpack\MenuCRUD\app' in the pasted files with your application's namespace ('App' if you haven't changed it):
4545
- app/Http/Controllers/Admin/MenuItemCrudController.php
@@ -59,9 +59,12 @@ Route::group(['prefix' => config('backpack.base.route_prefix', 'admin'), 'middle
5959
});
6060
```
6161

62-
7) [optional] Add a menu item for it in resources/views/vendor/backpack/base/inc/sidebar.blade.php or menu.blade.php:
62+
7) [optional] Add a menu item for it:
6363

64-
```html
64+
```
65+
# For Backpack v6
66+
php artisan backpack:add-menu-content "<x-backpack::menu-item title='Menu' icon='la la-list' :link=\"backpack_url('menu-item')\" />"
67+
# For Backpack v5 or v4
6568
<li class="nav-item"><a class="nav-link" href="{{ backpack_url('menu-item') }}"><i class="nav-icon la la-list"></i> <span>Menu</span></a></li>
6669
```
6770

@@ -104,8 +107,8 @@ You can access item children with `$item->children`
104107
<a class="no-underline hover:underline p-3"
105108
href="{{$item->url()}}">
106109
{{ $item->name }}
107-
</a>
108-
@endforeach
110+
</a>
111+
@endforeach
109112
```
110113

111114
For Installation type (B), change the namespace to `Backpack\MenuCRUD\app\Models`.
@@ -116,8 +119,8 @@ Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recen
116119

117120
## Overwriting functionality
118121

119-
If you've used installation type A and need to modify how this works in a project:
120-
- create a ```routes/backpack/menucrud.php``` file; the package will see that, and load _your_ routes file, instead of the one in the package;
122+
If you've used installation type A and need to modify how this works in a project:
123+
- create a ```routes/backpack/menucrud.php``` file; the package will see that, and load _your_ routes file, instead of the one in the package;
121124
- create controllers/models that extend the ones in the package, and use those in your new routes file;
122125
- modify anything you'd like in the new controllers/models;
123126

0 commit comments

Comments
 (0)