Laravel package designed to manage profiles and permissions based on Routing Laravel Features
16
2
2
Package Data
Maintainer Username: folivaresrios
Maintainer Contact: f.olivaresrios@gmail.com (Fabián Olivares Ríos)
Package Create Date: 2016-12-16
Package Last Update: 2021-08-31
Home Page:
Language: PHP
License: MIT
Last Refreshed: 2024-12-26 15:08:45
Package Statistics
Total Downloads: 16
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 2
Total Watchers: 2
Total Forks: 0
Total Open Issues: 0

kissDev Overseer Package

Laravel 5.3 License

Structure Based: caffeinated/shinobi

Overseer provides a simple profile-based permissions system to Laravel's built in Auth system. Overseer provides support for the following ACL structure:

  • Every user can have zero or more profiles.
  • Every profile can have zero or more permissions.

Permissions are then inherited to the user through the user's assigned profiles.

The package follows the FIG standards PSR-1, PSR-2, and PSR-4. This package is not unit tested, but is planned to be covered.

Documentation

Wiki: KissDev Overseer Wiki

Requirements

The master branch has the following requirements:

  • Laravel 5.* or greater.
  • PHP 5.6.4 or greater.

How to Install?

[Using Composer]

Add the plugin to your project's composer.json - something like this:

{
  "require": {
    "folivaresrios/overseer": "^1.0"
  }
}

or through command line

composer require folivaresrios/overseer

Service Provider and Facade

Once this operation is complete, simply add the service provider and alias to your project's config/app.php file and run the provided migrations against your database.

'providers' => [
    //...
    KissDev\Overseer\OverseerServiceProvider::class,
    //...
];
'aliases' => [
    // ...
    'Overseer' => KissDev\Overseer\Facades\Overseer::class,
    // ...
],

Migrations

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
php artisan migrate

Route Middleware

Add the following middleware to the $routeMiddleware array in app/Http/Kernel.php BEFORE the EncryptCookies middleware:

protected $routeMiddleware = [
    //...
    'profile.overseer' => \KissDev\Overseer\Middleware\UserHasProfile::class,
    'permissions.overseer' => \KissDev\Overseer\Middleware\UserHasPermission::class,
    //...
];

Reporting Issues

If you have a problem with Overseer please open an issue on GitHub.

Contributing

If you'd like to contribute to Overseer creating something you'd like added, send a pull requests or open issues.