mathewparet / laravel-permission-seeder
Permission Seeders for Spatie/Laravel-Permissions
Package info
bitbucket.org/mathewparet/laravel-permission-seeder
pkg:composer/mathewparet/laravel-permission-seeder
v2.0.7
2023-12-15 14:05 UTC
This package is auto-updated.
Last update: 2026-03-15 18:57:37 UTC
README
A seeder helper to create and remove permissions.
Installation
composer require mathewparet/laravel-permission-seeder
Usage
To create a permission seeder:
php artisan make:permission-seeder User UserPermissionSeeder
To create permissions along with migration, add this to the up() function in the migration:
UserPermissionSeeder::seed();
Similarly, to remove permissions while rolling back a migration, add this to the down() function in the migration:
UserPermissionSeeder::unseed();