-
Notifications
You must be signed in to change notification settings - Fork 0
Installation
Carlos G. Camacho O edited this page May 15, 2018
·
1 revision
Begin by installing the package through Composer. The best way to do this is through your terminal via Composer itself:
composer require carloscgo/shinobi
Once this operation is complete, simply add the service provider to your project's config/app.php
file and run the provided migrations against your database.
CarlosCGO\Shinobi\ShinobiServiceProvider::class,
'Shinobi' => CarlosCGO\Shinobi\Facades\Shinobi::class,
Then open the Kernel.php file in app\Http\Kernel.php and add this to user it as middleware :
Shinobi provides middleware that you may assign to specific routes in your application. To register, simply append the following middleware to your app/Http/Kernel.php
file under the $routeMiddleware
property.
'has.role' => \CarlosCGO\Shinobi\Middleware\UserHasRole::class,
'has.permission' => \CarlosCGO\Shinobi\Middleware\UserHasPermission::class,
You'll need to run the provided migrations against your database. Publish the migration files using the vendor:publish
Artisan command and run migrate
:
php artisan vendor:publish --provider="CarlosCGO\Shinobi\ShinobiServiceProvider"
php artisan migrate