2017 © Pedro Peláez
 

library cani

image

winponta/cani

  • Tuesday, October 4, 2016
  • by nunomazer
  • Repository
  • 2 Watchers
  • 1 Stars
  • 19 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 2 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Cani (Can I)

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)

Warning

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)

Installation

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)

Configuration

Inside the config/cani.php you'll have the following options:, (*14)

Models

Permission

Which Eloquent Model should be used to retrieve your permissions. Your model must implement the Winponta\Cani\Contracts\Permission contract., (*15)

Role

Which model should be used to retrieve your roles. Your model must implement the Winponta\Cani\Contracts\Role contract., (*16)

Collections

Users

The collection your application uses for users. This collection's model will be using the CanHavePermissions and CanHaveRoles traits., (*17)

Roles

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)

Permissions

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)

The Versions

04/10 2016

dev-master

9999999-dev

  Sources   Download

04/10 2016

0.0.2

0.0.2.0

  Sources   Download

20/07 2016

0.0.1

0.0.1.0

  Sources   Download