permission generation for all your declared routes with corresponding controller action

Last update: Apr 19, 2022

Permissions Generator

Latest Version on Packagist Total Downloads Build Status StyleCI

This package add some artisan command to help generating permissions for your declared routes.

Each route should have an alias (name) seperated by dot(.) for exemple:

Route::get('/posts/special_action',[App\Http\Controllers\PostController::class, 'specialaction'])->name('posts.specialaction');
Route::get('/posts/another_action',[App\Http\Controllers\PostController::class, 'anotheraction'])->name('posts.anotheraction');

In this example permissions will be generated for the PostController linked to the specialaction and anotheraction

public function __construct()//#
{
    $this->middleware('auth');
    $this->middleware(['permission:posts.specialaction'])->only(['specialaction']);
    $this->middleware(['permission:posts.anotheraction'])->only(['anotheraction']);
        
 }//#

Take a look at contributing.md to see a to do list.

Installation

Via Composer

$ composer require mouhamedfd/permissions-generator

Publish configuration

php artisan vendor:publish --tag=permissions-generator.config

The default configuration exclude some keywords and some columns, it's also possible to add some middlewares

return [
    'excluded_keywords'=>[
        'Auth',
        'Translation',
    ],
    'have_resource_column'=>false,
    'have_description_column'=>false,
    'middlewares'=>[
        'auth',
    ],

];

Usage

Simulation mode

php artisan permission:generate

Database mode

php artisan permission:generate --action=database

Insertion to controllers

php artisan permission:generate --action=controllers

Change log

Please see the changelog for more information on what has changed recently.

Contributing

Please see contributing.md for details and a todolist.

Credits

License

MIT. Please see the license file for more information.

GitHub

https://github.com/mouhamedfd/permissions-generator
You might also like...

It's a Laravel 8 authentication markdown that will help you to understand and grasp all the underlying functionality for Session and API Authentication

About Auth Starter It's a Laravel 8 authentication markdown that will help you to understand and grasp all the underlying functionality for Session an

Aug 3, 2022

Sign into your Flarum forum with your Amazon account

Log In With Amazon A Flarum extension. Log in to your Flarum forum with Amazon. An addon for FoF OAuth Installation Install with composer: composer re

May 4, 2022

Open source social sign on PHP Library. HybridAuth goal is to act as an abstract api between your application and various social apis and identities providers such as Facebook, Twitter and Google.

Hybridauth 3.7.1 Hybridauth enables developers to easily build social applications and tools to engage websites visitors and customers on a social lev

Aug 7, 2022

Handle roles and permissions in your Laravel application

Laratrust (Laravel Package) Version Compatibility Laravel Laratrust 8.x 6.x 7.x 6.x 6.x 6.x 5.6.x - 5.8.x 5.2 5.3.x - 5.5.x 5.1 5.0.x - 5.2.x 4.0. Ins

Aug 7, 2022

Limit access to your Laravel applications by using invite codes

Doorman Doorman provides a way to limit access to your Laravel applications by using invite codes. Invite Codes: Can be tied to a specific email addre

Aug 4, 2022

Dynamic ACL is a package that handles Access Control Level on your Laravel Application.

Dynamic ACL Dynamic ACL is a package that handles Access Control Level on your Laravel Application. It's fast to running and simple to use. Install an

Jul 31, 2022

It's authorization form, login button handler and login to your personal account, logout button

It's authorization form, login button handler and login to your personal account, logout button

Authorization-form It's authorization form, login button handler and login to your personal account, logout button Each file is: header.php - html-fil

Nov 2, 2021

This system will provide security and comfortable opportunities to protect your gaming account.

VK Security – Auth system VK Security provides the ability to use game authorization inside in conjunction with the official VKontakte groups. Conveni

May 23, 2022

Manage authorization with granular role-based permissions in your Laravel Apps.

Manage authorization with granular role-based permissions in your Laravel Apps.

Governor For Laravel Manage authorization with granular role-based permissions in your Laravel apps. Goal Provide a simple method of managing ACL in a

Jul 25, 2022
User role and Permission Management system with Paticie package

User role and Permission Management system with Paticie package Installation instruction Download or git clone https://github.com/KKOO727/User-role-ma

Mar 4, 2022
This package helps you to associate users with permissions and permission groups with laravel framework
This package helps you to associate users with permissions and permission groups with laravel framework

Laravel ACL This package allows you to manage user permissions and groups in a database, and is compatible with Laravel v5.8 or higher. Please check t

Aug 5, 2022
A user, group, role and permission management for Codeigniter 4

CI4-Auth CI4-Auth is a user, group, role and permission management library for Codeigniter 4. CI4-Auth is based on the great Myth-Auth library for Cod

Aug 1, 2022
Nginx FastCGI Fix Permission

Nginx FastCGI Fix Permission Table of Contents About How it works Installation Changelog Contributing License About This library was born with the obj

Mar 14, 2022
Yet another asynchronous permission management plugin for PocketMine-MP.

GroupsAPI Yet another asynchronous permission management plugin for PocketMine-MP. Features Developer-friendly API Temporary rank/group support Multip

Jul 20, 2022
Tools for checking malware, permission of file php and any on website
Tools for checking malware, permission of file php and any on website

webtools Tools for checking malware, permission of file php and any on website You can use the webtools.php file directly. All features can be accesse

Jun 14, 2022
Hierarchical Rol-Permission Based Laravel Auth Package with Limitless Hierarchical Level of Organizations
Hierarchical Rol-Permission Based Laravel Auth Package with Limitless Hierarchical Level of Organizations

AAuth for Laravel Hierarchical Rol-Permission Based Laravel Auth Package with Limitless Hierarchical Level of Organizations Features Organization Base

Aug 4, 2022
Routes and Middleware for Using OAuth2 Server within a Slim Framework API

Chadicus\Slim\OAuth2 A collection of OAuth2 Server routes, middleware and utilities for use within a Slim 3 Framework API Requirements Chadicus\Slim\O

May 31, 2022
Two-Factor Authentication for all your users out-of-the-box.

Two Factor On-premises Two-Factor Authentication for all your users out of the box. use Illuminate\Support\Facades\Auth; use Laragear\TwoFactor\TwoFac

Aug 7, 2022
All in one monitoring for NKN.org Crypto currency Miners!
All in one monitoring for NKN.org Crypto currency Miners!

nWatch - All in one NKN Crypto currency Miner & wallets monitoring NKN network is based on miners cheap and easy to deploy (from VPS to Raspberry Pi)

Jan 10, 2022