Package Data | |
---|---|
Maintainer Username: | sroutier |
Maintainer Contact: | sroutier@gmail.com (Sebastien Routier) |
Package Create Date: | 2016-02-03 |
Package Last Update: | 2016-02-04 |
Language: | PHP |
License: | GPLv3 |
Last Refreshed: | 2024-11-22 15:01:54 |
Package Statistics | |
---|---|
Total Downloads: | 52 |
Monthly Downloads: | 1 |
Daily Downloads: | 0 |
Total Stars: | 0 |
Total Watchers: | 2 |
Total Forks: | 0 |
Total Open Issues: | 0 |
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.
Via Composer
$ composer require sroutier/menu-builder
Add this declaration in the provider array of your ./config/app.php
file:
...
Sroutier\MenuBuilder\Providers\MenuBuilderServiceProvider::class,
...
Add this declaration in the aliases array of your './config/app.php' file:
...
'MenuBuilder' => Sroutier\MenuBuilder\Facades\MenuBuilderFacade::class,
...
You will have to publish at least the migration script, the seeding scripts and the route example, but following the instructions below:
To publish all assets, run this command:
$ php artisan vendor:publish --provider="Sroutier\MenuBuilder\Providers\MenuBuilderServiceProvider"
To publish only the migrations, run this command:
$ php artisan vendor:publish --provider="Sroutier\MenuBuilder\Providers\MenuBuilderServiceProvider" --tag="migrations"
To publish only the seeds, run this command:
$ php artisan vendor:publish --provider="Sroutier\MenuBuilder\Providers\MenuBuilderServiceProvider" --tag="seeds"
To publish only the config, run this command:
$ php artisan vendor:publish --provider="Sroutier\MenuBuilder\Providers\MenuBuilderServiceProvider" --tag="config"
To publish only the routes, run this command:
$ php artisan vendor:publish --provider="Sroutier\MenuBuilder\Providers\MenuBuilderServiceProvider" --tag="routes"
To publish only the views, run this command:
$ php artisan vendor:publish --provider="Sroutier\MenuBuilder\Providers\MenuBuilderServiceProvider" --tag="views"
Run the migration script to create the database with this command:
$ php artisan migrate
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:
$this->call('ProductionSeeder');
Once ready, call the artisan seed command:
$ php artisan db:seed
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.
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:
require __DIR__.'/routes-menu-builder.php';
Please see CHANGELOG for more information what has changed recently.
$ composer test
Please see CONTRIBUTING and CONDUCT for details.
If you discover any security related issues, please email sroutier@gmail.com instead of using the issue tracker.
The GNU General Public License Version 3 (GPLv3). Please see License File for more information.