laravel permissions package code example
Example 1: laravel file permissions
sudo chgrp -R www-data storage bootstrap/cache
sudo chmod -R ug+rwx storage bootstrap/cache
Example 2: 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"