solutionforest / filament-access-management

Extends on Laravel-permission
https://spatie.be/docs/laravel-permission/v5/introduction
MIT License
44 stars 13 forks source link

Cannot install plugin in fresh Laravel project #11

Open DiGiTransf opened 6 months ago

DiGiTransf commented 6 months ago

Hi, had an issue installing plugin in a new Laravel 10 project on a Windows PC.

It failed on *"There is no permission named `users.for guardweb`."** error.

Migrations run smoothly and created DB structure.

php artisan about output:

Environment ..................................................................................................................
Application Name ..................................................................................................... Laravel
Laravel Version ...................................................................................................... 10.38.2
PHP Version ............................................................................................................ 8.3.1
Composer Version ....................................................................................................... 2.6.6
Environment ............................................................................................................ local
Debug Mode ........................................................................................................... ENABLED
URL ................................................................................................................ localhost
Maintenance Mode ......................................................................................................... OFF

Cache ........................................................................................................................
Config ............................................................................................................ NOT CACHED
Events ............................................................................................................ NOT CACHED
Routes ............................................................................................................ NOT CACHED
Views ............................................................................................................. NOT CACHED

Drivers ......................................................................................................................
Broadcasting ............................................................................................................. log
Cache ................................................................................................................... file
Database ............................................................................................................... mysql
Logs .......................................................................................................... stack / single
Mail .................................................................................................................... smtp
Queue ................................................................................................................... sync
Session ................................................................................................................. file

Filament .....................................................................................................................
Packages ..................................................................... filament, forms, notifications, support, tables
Version ............................................................................................................... v3.1.0
Views .......................................................................................................... NOT PUBLISHED

Livewire .....................................................................................................................
Livewire .............................................................................................................. v3.3.3

node --version v20.10.0

Transcript follows:

PS C:\Lavoro\lara_lab> composer require solution-forest/filament-access-management ./composer.json has been updated Running composer update solution-forest/filament-access-management Loading composer repositories with package information Updating dependencies Lock file operations: 4 installs, 0 updates, 0 removals

@php artisan filament:upgrade ⇂ C:\Lavoro\lara_lab\public\js\filament\forms\components\color-picker.js
⇂ C:\Lavoro\lara_lab\public\js\filament\forms\components\date-time-picker.js ⇂ C:\Lavoro\lara_lab\public\js\filament\forms\components\file-upload.js ⇂ C:\Lavoro\lara_lab\public\js\filament\forms\components\key-value.js ⇂ C:\Lavoro\lara_lab\public\js\filament\forms\components\markdown-editor.js ⇂ C:\Lavoro\lara_lab\public\js\filament\forms\components\rich-editor.js ⇂ C:\Lavoro\lara_lab\public\js\filament\forms\components\select.js ⇂ C:\Lavoro\lara_lab\public\js\filament\forms\components\tags-input.js ⇂ C:\Lavoro\lara_lab\public\js\filament\forms\components\textarea.js ⇂ C:\Lavoro\lara_lab\public\js\filament\tables\components\table.js ⇂ C:\Lavoro\lara_lab\public\js\filament\widgets\components\chart.js ⇂ C:\Lavoro\lara_lab\public\js\filament\widgets\components\stats-overview\stat\chart.js ⇂ C:\Lavoro\lara_lab\public\js\filament\filament\app.js ⇂ C:\Lavoro\lara_lab\public\js\filament\filament\echo.js ⇂ C:\Lavoro\lara_lab\public\js\filament\notifications\notifications.js ⇂ C:\Lavoro\lara_lab\public\js\filament\support\async-alpine.js ⇂ C:\Lavoro\lara_lab\public\js\filament\support\support.js ⇂ C:\Lavoro\lara_lab\public\js\solution-forest\filament-tree\filament-tree-min.js ⇂ C:\Lavoro\lara_lab\public\css\filament\forms\forms.css ⇂ C:\Lavoro\lara_lab\public\css\filament\support\support.css ⇂ C:\Lavoro\lara_lab\public\css\guava\filament-icon-picker\filament-icon-picker-stylesheet.css ⇂ C:\Lavoro\lara_lab\public\css\solution-forest\filament-tree\filament-tree-min.css ⇂ C:\Lavoro\lara_lab\public\css\filament\filament\app.css

INFO Successfully published assets!

INFO Configuration cache cleared successfully.

INFO Compiled views cleared successfully.

INFO Successfully upgraded!

101 packages you are using are looking for funding. Use the composer fund command to find out more!

@php artisan vendor:publish --tag=laravel-assets --ansi --force

INFO No publishable resources for tag [laravel-assets]. No security vulnerability advisories found. Using version ^2.0 for solution-forest/filament-access-management PS C:\Lavoro\lara_lab> php artisan optimize:clear

INFO Clearing cached bootstrap files.

events .............................................................................................................. 7ms DONE
views .............................................................................................................. 11ms DONE
cache ............................................................................................................... 8ms DONE
route ............................................................................................................... 3ms DONE
config .............................................................................................................. 3ms DONE
compiled ........................................................................................................... 12ms DONE

PS C:\Lavoro\lara_lab> php artisan filament-access-management:install Publishing config... Publishing migrations... filament-access-management has been installed!

INFO Running migrations.

2023_12_23_185116_create_filament_admin_tables .................................................................. 1,039ms DONE

INFO Seeding database.

Spatie\Permission\Exceptions\PermissionDoesNotExist

There is no permission named users.* for guard web.

at vendor\spatie\laravel-permission\src\Exceptions\PermissionDoesNotExist.php:11 7▕ class PermissionDoesNotExist extends InvalidArgumentException 8▕ { 9▕ public static function create(string $permissionName, string $guardName = '') 10▕ { ➜ 11▕ return new static("There is no permission named {$permissionName} for guard {$guardName}."); 12▕ } 13▕ 14▕ public static function withId(int $permissionId, string $guardName = '') 15▕ {

1 vendor\spatie\laravel-permission\src\Models\Permission.php:96 Spatie\Permission\Exceptions\PermissionDoesNotExist::create("users.*", "web")

2 vendor\spatie\laravel-permission\src\Traits\HasPermissions.php:449 Spatie\Permission\Models\Permission::findByName("users.*", "web")

PS C:\Lavoro\lara_lab>

DiGiTransf commented 6 months ago

Edit: - Permission table content after stop: image