Skip to content

jan-kir-wwu/laravel-permission-ui

 
 

Repository files navigation

Laravel Permission UI

This is a fork of a small laraveldaily package called laravel-permission-ui. I changed it so only a system admin can create and update permissions and roles. Users can only update other users with roles they have as well.


This package will create a simple Dashboard for managing roles/permissions based on the spatie/laravel-permission package.

Notice: this is a very early version of the package, may be buggy. Please report issues.


Installation

First, before installing this package, you need to have the spatie/laravel-permission installed and configured.

composer require laraveldaily/laravel-permission-ui

Go to yourdomain.com/permissions and you should see a simple dashboard with three menu items on top: to manage roles, permissions and assign them to users.

Spatie Permission UI

That dashboard is by default protected by the auth middleware, but you can configure it, by publishing the config:

php artisan vendor:publish --provider="LaravelDaily\PermissionsUI\PermissionsUIServiceProvider" --tag="config"

And then edit the values in config/permission_ui.php:

return [
    'middleware'        => ['web', 'auth'],
    'url_prefix'        => 'permissions',
    'route_name_prefix' => 'permission_ui.',
    'system_admin_role' => 'system admin',
];

Publishing translations

If you wish to translate the package, you may publish the language files using:

php artisan vendor:publish --provider="LaravelDaily\PermissionsUI\PermissionsUIServiceProvider" --tag="lang"

Testing

To run the package's unit tests, run the following command:

vendor/bin/phpunit

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 53.2%
  • Blade 45.3%
  • JavaScript 1.4%
  • CSS 0.1%