permission generation for all your declared routes with corresponding controller action

Overview

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.

You might also like...
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)

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

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

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

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

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

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

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

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

Releases(1.0.3)
Owner
Diagana Mouhamed Fadel
Diagana Mouhamed Fadel
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

Ninja 2 Mar 4, 2022
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

Mateus Junges 537 Dec 28, 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

George Lewe 15 Dec 16, 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

Ejetar 3 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

null 19 Nov 28, 2022
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

ForDeveloperTools 3 Jun 14, 2022
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

Aurora Web Software Team 23 Dec 27, 2022
Magic admin PHP SDK makes it easy to leverage Decentralized ID tokens to protect routes and restricted resources for your application.

Magic Admin PHP SDK The Magic Admin PHP SDK provides convenient ways for developers to interact with Magic API endpoints and an array of utilities to

magiclabs 17 Jun 26, 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

Chad Gray 126 Oct 8, 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

Laragear 105 Dec 22, 2022