Answers for "laravel laravel-permission"

PHP
2

laravel file permissions

sudo chgrp -R www-data storage bootstrap/cache
sudo chmod -R ug+rwx storage bootstrap/cache
Posted by: Guest on September-09-2020
0

spatie/laravel-permission

// Install package
composer require spatie/laravel-permission

// config/app.php
'providers' => [
    // ...
    Spatie\Permission\PermissionServiceProvider::class,
];

// Publish config file
php artisan vendor:publish --provider="Spatie\Permission\PermissionServiceProvider"

// Clear cache
php artisan optimize:clear
 # or
php artisan config:clear

// Run migration to create tables
php artisan migrate
Posted by: Guest on March-30-2021
0

laravel permission

//install laravel permission with composer installer for Laravel 6.0 or higher
composer require spatie/laravel-permission
php artisan vendor:publish --provider="Spatie\Permission\PermissionServiceProvider"
Posted by: Guest on December-17-2020

Browse Popular Code Answers by Language