Skip to content

Commit

Permalink
Merge pull request #136 from Laravel-Backpack/menu-readme
Browse files Browse the repository at this point in the history
Need to update menu-item instruction on readme as per v6
  • Loading branch information
tabacitu authored Jul 31, 2023
2 parents 1b996da + 26907a6 commit 92910a9
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,12 @@ php artisan vendor:publish --provider="Backpack\PageManager\PageManagerServicePr
php artisan migrate
```

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

```
# For Backpack v6
php artisan backpack:add-menu-content "<x-backpack::menu-item title='Pages' icon='la la-file-o' :link=\"backpack_url('page')\" />"
# For Backpack v5 or v4
php artisan backpack:add-sidebar-content "<li class='nav-item'><a class='nav-link' href='{{ backpack_url('page') }}'><i class='nav-icon la la-file-o'></i> <span>Pages</span></a></li>"
```

Expand Down Expand Up @@ -194,8 +197,8 @@ Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details

## Overwriting Functionality

If you need to modify how this works in a project:
- create a ```routes/backpack/pagemanager.php``` file; the package will see that, and load _your_ routes file, instead of the one in the package;
If you need to modify how this works in a project:
- create a ```routes/backpack/pagemanager.php``` file; the package will see that, and load _your_ routes file, instead of the one in the package;
- create controllers/models that extend the ones in the package, and use those in your new routes file;
- modify anything you'd like in the new controllers/models;

Expand Down

0 comments on commit 92910a9

Please sign in to comment.