Download the PHP package kineticamobile/atrochar without Composer
On this page you can find all versions of the php package kineticamobile/atrochar. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download kineticamobile/atrochar
More information about kineticamobile/atrochar
Files in kineticamobile/atrochar
Package atrochar
Short Description Menu Generator for Laravel Apps - Populate menus in your views using Database backed Menus with @menu Blade component
License MIT
Homepage https://github.com/kineticamobile/atrochar
Informations about the package atrochar
Atrochar
Menu Generator for Laravel Apps - Populate menus in your views using Database backed Menus with @menu Blade component
Installation
-
Via Composer
-
Add trait to your User model.
- Run migrations
Simple Usage
Create Menus and its items
You can access the Menu Management in your app "APP_URL/atrochar/menus"
or add link wherever you want
Add a created menu in your views with blade component
-
Using menu name
-
Using menu id
- Using menu object
Use views instead of programatic approach
You can publish the views of the components
You have two views in resources/views/vendors/atrochar
, default.blade.php
nad jetstream.blade.php
To use these views see examples below
-
@menuview($menu)
usedefault
@menuview($menu, 'jetstream')
usejetstream
Advanced Usage
Change Prefix of Package Routes
Publish configuration
Modify conf/atrochar.php
field prefix
. It allows empty string, if null atrochar
would be used.
Change iframe routes
Usually iframe links are in route atrochar/i/24
You can change i
for whatever you want in conf/atrochar.php
field iframe
after publish the configuration file
Restrict access to menu management
By default all users can manage menus.
You need to add the method canManageMenus()
to your user model:
Use of the links' permission field
By default all items can be viewed. But you can add permission in your links, if not empty this ability is checked against the User method canViewMenuItem($ability)
You need to add the method canViewMenuItem($ability)
to your user model to extend this behavior:
Style your menus using themes or overriding default values
Using themes. Publish the config file in your app. In config/atrochar.php you can modify default values or add new themes
Once you've created a theme you can pass a string as a second argument in the @menu component the name of the theme
If you pass an array as second argument the values override the defaultTheme values
Security
If you discover any security related issues, please email author email instead of using the issue tracker.
Credits
Licence
MIT