Wallogit.com
2017 © Pedro Peláez
Cani, or "Can I" project, is a Laravel 5 project that implement a simple ACL based on noSql databases. The first implementation is focused on MongoDB, using jenssegers/mongodb driver., (*1)
This project is fully based on https://github.com/spatie/laravel-permission package., (*2)
WIP -- this project is in its initial development, please come back in a few days, (*3)
** This project is tested on Laravel 5.2 version, not sure if all features work on 5.1. **, (*4)
In composer.json, (*5)
"require": {
...
"winponta/cani": "0.0.*",
...
},
Then run composer update., (*6)
In config/app.path at providers section, (*7)
Winponta\Cani\Providers\CaniServiceProvider::class,, (*8)
In the same file, under the aliases array, you may want to add the Cani Facade., (*9)
'Cani' => Winponta\Cani\Facades\Cani::class,, (*10)
Save the file and then run:, (*11)
php artisan vendor:publish --provider="Winponta\Cani\Providers\CaniServiceProvider", (*12)
This command will publish the cani's config file inside your config directory., (*13)
Inside the config/cani.php you'll have the following options:, (*14)
Which Eloquent Model should be used to retrieve your permissions. Your model must implement the Winponta\Cani\Contracts\Permission contract., (*15)
Which model should be used to retrieve your roles. Your model must implement the Winponta\Cani\Contracts\Role contract., (*16)
The collection your application uses for users. This collection's model will be using the CanHavePermissions and CanHaveRoles traits., (*17)
The collection your application uses for roles. When using the CanHaveRoles trait we need to know which collection should be used to retrieve your roles., (*18)
The collection your application uses for permissions. When using the CanHavePermissions trait we need to know which collection should be used to retrieve your permissions., (*19)