Skip to content

Latest commit

 

History

History
51 lines (45 loc) · 1.22 KB

README.md

File metadata and controls

51 lines (45 loc) · 1.22 KB

Implementation of roles and permissions in laravel 7

Example of implementation of roles and permissions in laravel using the laravel-authorization package

Installation

1. Clone the repository

 git clone https://github.com/eneav/laravel-authorization-example.git

2. Install dependencies

 cd laravel-authorization-example
 composer install

If the .env file is not generated, it must be generated

 cp .env.example .env
 php artisan key:generate

3. Create a database

mysql> create database authorization_example;

4. Configure database credentials

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=authorization_example 
DB_USERNAME=root
DB_PASSWORD=

5. execute the migrations and seeders

 php artisan migrate --seed

6. Turn on the server

 php artisan serve

Users

Username Password Permissions Roles
hello@enea.io nano * Admin
editor@enea.io nano mofidy-articles
creator@enea.io nano create-articles
destroyer@enea.io nano destroy-articles