2017 © Pedro Peláez
 

library authorization

Roles & Permission management with Laravel user module

image

prllxtchz/authorization

Roles & Permission management with Laravel user module

  • Friday, June 29, 2018
  • by parallaxtechz
  • Repository
  • 1 Watchers
  • 0 Stars
  • 6 Installations
  • HTML
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

, (*1)

Latest Stable Version Total Downloads License, (*2)

Adding User & User Role CRUD to Laravel Project

Installation

composer require prllxtchz/authorization

Publish Spatie\Permission package migrations & config file to project., (*3)

php artisan vendor:publish --provider="Spatie\Permission\PermissionServiceProvider" 

running authorization package views, migrations & seeds to project., (*4)

php artisan vendor:publish --provider="Prllxtchz\Authorization\AuthorizationServiceProvider"

Then run Laravel auth command to generate auth files., (*5)

php artisan make:auth

and add HasRoles trait to User model., (*6)

use Spatie\Permission\Traits\HasRoles;

https://github.com/spatie/laravel-permission#usage, (*7)

use Spatie\Permission\Traits\HasRoles;

class User extends Authenticatable
{
    use HasRoles;

    // ...
}

Before run any migrations, update database/seeds/DatabaseSeeder.php file with following,, (*8)

$this->call(UserPermissionSeed::class);
$this->call(UserRolePermissionSeed::class);
$this->call(GiveAllPermissionsToAdmin::class);

Then you can run all migrations with seeds., (*9)

You may need to run composer dump-autload before run migrations., (*10)

php artisan migrate --seed

Usage

Admin login detail which has all current permissions

Name: Admin
Email: admin@parallax.lk
Password: @parallax<>

Generated routes

/users /routes, (*11)

The Versions

29/06 2018

dev-master

9999999-dev

Roles & Permission management with Laravel user module

  Sources   Download

MIT

The Requires

 

by Namal Attanayake

29/06 2018

v1.1.0

1.1.0.0

Roles & Permission management with Laravel user module

  Sources   Download

MIT

The Requires

 

by Namal Attanayake

29/06 2018

v1.0.4

1.0.4.0

Roles & Permission management with Laravel user module

  Sources   Download

MIT

The Requires

 

by Namal Attanayake

29/06 2018

v1.0.3

1.0.3.0

Roles & Permission management with Laravel user module

  Sources   Download

MIT

The Requires

 

by Namal Attanayake

29/06 2018

v1.0.2

1.0.2.0

Roles & Permission management with Laravel user module

  Sources   Download

MIT

The Requires

 

by Namal Attanayake

29/06 2018

v1.0.1

1.0.1.0

Roles & Permission management with Laravel user module

  Sources   Download

MIT

The Requires

 

by Namal Attanayake

28/06 2018

v1.0.0

1.0.0.0

Roles & Permission management with Laravel user module

  Sources   Download

MIT

The Requires

 

by Namal Attanayake