vaened / laravel-authorization-example

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

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


Languages

Language:PHP 78.6%Language:HTML 20.9%Language:Vue 0.5%