2017 © Pedro Peláez
 

library menu-builder

A laravel package that allows to dynamically build and manage a set of menus and breadcrumb trails.

image

sroutier/menu-builder

A laravel package that allows to dynamically build and manage a set of menus and breadcrumb trails.

  • Thursday, February 4, 2016
  • by sroutier
  • Repository
  • 1 Watchers
  • 0 Stars
  • 40 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

menu-builder

Latest Version on Packagist Software License ![Build Status][ico-travis] Coverage Status ![Quality Score][ico-code-quality] Total Downloads, (*1)

This is where your description should go. Try and limit it to a paragraph or two, and maybe throw in a mention of what PSRs you support to avoid any confusion with users and contributors., (*2)

Install

Via Composer, (*3)

``` bash $ composer require sroutier/menu-builder, (*4)


## Declare provider Add this declaration in the provider array of your `./config/app.php` file: ``` php ... Sroutier\MenuBuilder\Providers\MenuBuilderServiceProvider::class, ...

Declare facade

Add this declaration in the aliases array of your './config/app.php' file:, (*5)

    ...
        'MenuBuilder' => Sroutier\MenuBuilder\Facades\MenuBuilderFacade::class,        
    ...

Publish assets

You will have to publish at least the migration script, the seeding scripts and the route example, but following the instructions below:, (*6)

To publish all assets, run this command:, (*7)

``` bash $ php artisan vendor:publish --provider="Sroutier\MenuBuilder\Providers\MenuBuilderServiceProvider", (*8)


To publish only the migrations, run this command: ``` bash $ php artisan vendor:publish --provider="Sroutier\MenuBuilder\Providers\MenuBuilderServiceProvider" --tag="migrations"

To publish only the seeds, run this command:, (*9)

``` bash $ php artisan vendor:publish --provider="Sroutier\MenuBuilder\Providers\MenuBuilderServiceProvider" --tag="seeds", (*10)


To publish only the config, run this command: ``` bash $ php artisan vendor:publish --provider="Sroutier\MenuBuilder\Providers\MenuBuilderServiceProvider" --tag="config"

To publish only the routes, run this command:, (*11)

``` bash $ php artisan vendor:publish --provider="Sroutier\MenuBuilder\Providers\MenuBuilderServiceProvider" --tag="routes", (*12)


To publish only the views, run this command: ``` bash $ php artisan vendor:publish --provider="Sroutier\MenuBuilder\Providers\MenuBuilderServiceProvider" --tag="views"

Setup the database

Run the migration script to create the database with this command:, (*13)

``` bash $ php artisan migrate, (*14)


Then seed the database with at least the `root` menu entry taken from the seed files that you published as shown in the previous section. You could also edit the published seed files to add a few basic menu entries as shown in those files. To seed the database add this line to your main `database/seeds/DatabaseSeeder.php` file using the code below: ``` php $this->call('ProductionSeeder');

Once ready, call the artisan seed command:, (*15)

``` bash $ php artisan db:seed, (*16)


**NOTE:** If you are in a development environment and want to create a few extra menu entries, have a look at the seed file `MenuBuilderDevSeeder.php` that was publish along with the Prod file. ## Define routes You must define the routes that you want to use, this task can be helped by publishing the routes as shown in the previous section. This will create a file called `routes-menu-builder.php` in the directory `app/Http` containing examples of routes needed for this package. You must configure your own routes by either copying and pasting the content of the routes file, in part or in it's entirety, to your routes file `app/Http/routes.php`, or you could include a reference to the published file by adding a this line: ```php require __DIR__.'/routes-menu-builder.php';

Change log

Please see CHANGELOG for more information what has changed recently., (*17)

Testing

bash $ composer test, (*18)

Contributing

Please see CONTRIBUTING and CONDUCT for details., (*19)

Security

If you discover any security related issues, please email sroutier@gmail.com instead of using the issue tracker., (*20)

Credits

License

The GNU General Public License Version 3 (GPLv3). Please see License File for more information., (*21)

The Versions

04/02 2016

dev-master

9999999-dev https://github.com/sroutier/menu-builder

A laravel package that allows to dynamically build and manage a set of menus and breadcrumb trails.

  Sources   Download

GPLv3

The Requires

 

The Development Requires

laravel menu menu-builder sroutier

03/02 2016

0.1.0

0.1.0.0 https://github.com/sroutier/menu-builder

A laravel package that allows to dynamically build and manage a set of menus and breadcrumb trails.

  Sources   Download

GPLv3

The Requires

 

The Development Requires

laravel menu menu-builder sroutier