Skip to content

iutrace/laravel-abilities

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laravel Abilities

A convenient way to encapsulate model conditions business logic

Laravel Gates are an excellent way to separate logic of access and permissions from models, but if we need to separate only models conditions not related to users (ex: if is valid to Publish a Post at certain state regardless of user)

This package adds a layer on top of laravel Gates, so first "ability" validity is checked then user access and permission is checked though normal laravel Gates if present.

Also, this package adds abilities and policies attributes to your models through HasHabilities trait, useful if you need available "actions" at frontend.

Installation

$ composer require iutrace/laravel-abilities

Usage

About

Easily add abilities business logic to your models

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages