LaravelPackages.net
Acme Inc.
Toggle sidebar
deltoss/sentinel-database-permissions

A laravel package that extends sentinel to use permissions from database tables.

110
6
1.0.0
About deltoss/sentinel-database-permissions

deltoss/sentinel-database-permissions is a Laravel package for a laravel package that extends sentinel to use permissions from database tables.. It currently has 6 GitHub stars and 110 downloads on Packagist (latest version 1.0.0). Install it with composer require deltoss/sentinel-database-permissions. Discover more Laravel packages by deltoss or browse all Laravel packages to compare alternatives.

Last updated

CircleCI

Introduction

A Laravel package that configures Sentinel to use database permissions. Cartalyst Sentinel already has permissions, however their permissions are JSON values stored under the user or role record.

Some would prefer permissions to be a database table, to perform certain operations more efficiently when it comes to permissions. For example lets say we want to get a list of all permissions in the database.

In Cartalyst Sentinel, to get all permissions, you'd need to iterate through all users and roles, and for each of the user/role, you'd need to get their list of permissions and get only the distinct permissions. If you have a lot of users and roles, this approach won't be efficient. If you put permissions on a database table, then all you need to do is query that one table.

This package integrates with Sentinel and add its own set of methods. This means for the most part, you can use the Sentinel's API as per normal. The only caveat is before adding permissions, you'll need to create the ability on the database beforehand.

Requirements

  • Laravel Framework 5.5+
  • Cartalyst Sentinel 2.0+
  • php 7.1.3+

Documentation

The project documentation can be found in the repo's GitHub pages

License

MIT © Michael Tran

Star History Chart