aflanry/menus

A menu for us to use

v1.0.0 2021-01-12 23:43 UTC

This package is auto-updated.

Last update: 2024-11-13 08:25:56 UTC


README

Requires

  • Bootstrap 4 for default view
  • FontAwesome if using icons
  • Menu only displays for authenticated views
  • isAdmin() implemented in the User model
  • user_groups table using id as the primary key

Getting Started

Install the package via composer, publish the vendor files, and migrate the new menu tables

composer require aflanry/menus --dev
php artisan vendor:publish
php artisan migrate

Edit config/menu.php using the template with your menu. Then you can seed the database with the values in the config file.

php artisan db:seed --class=MenuSeeder

Next the sass and javascript for the menus must be added to your bundles

@import("vendor/menu/_menu");
require('./vendor/menu/menu');

Finally include the menu view in your layout!

@include('menu::menu')

Editing the menu view

The menu view is published in the resources/views/vendor/menu folder You can edit the menu as you see fit!