alokadev / easypack
EasyPack: a Laravel 12 extensible package
Installs: 2
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/alokadev/easypack
Requires
- php: ^8.2
- illuminate/support: ^12.0
- spatie/laravel-medialibrary: ^11.0
- spatie/laravel-permission: ^6.0
This package is not auto-updated.
Last update: 2025-11-09 17:29:40 UTC
README
EasyPack is a Laravel package designed to simplify the setup of commonly used Spatie packages: spatie/laravel-permission and spatie/laravel-medialibrary. It provides an Artisan command to publish their necessary assets (configurations and migrations) and guides the user through the final setup steps.
Features
- Automatically includes
spatie/laravel-permissionandspatie/laravel-medialibraryas dependencies. - Provides an
easypack:installArtisan command to:- Publish configuration files for
spatie/laravel-permission(asconfig/permission.php). - Publish configuration files for
spatie/laravel-medialibrary(asconfig/medialibrary.php). - Publish migration files for both Spatie packages to your application's
database/migrationsdirectory. - Publish its own configuration file (if available) as
config/easypack.php.
- Publish configuration files for
- Guides users to configure their database and run migrations.
Installation
-
Require the package via Composer in your Laravel project:
composer require alokadev/easypack
-
The package uses Laravel's auto-discovery, so the service provider will be registered automatically.
Setup
After installing the package, run the easypack:install Artisan command:
php artisan easypack:install
This command will perform the following actions:
- Publish Configuration Files:
spatie/laravel-permissionconfig will be published toconfig/permission.php.spatie/laravel-medialibraryconfig will be published toconfig/medialibrary.php.- If
easypackhas its own publishable configuration, it will be published toconfig/easypack.php.
- Publish Migration Files:
- Migrations from
spatie/laravel-permissionwill be copied to yourdatabase/migrationsfolder. - Migrations from
spatie/laravel-medialibrarywill be copied to yourdatabase/migrationsfolder.
- Migrations from
Important: After the command completes, it will remind you to:
- Ensure your database is created and configured in your project's
.envfile. - Run the migrations to create the necessary tables for
laravel-permissionandlaravel-medialibrary:php artisan migrate
Configuration
- Spatie Laravel Permission: You can customize the behavior of
spatie/laravel-permissionby editing theconfig/permission.phpfile. - Spatie Laravel Medialibrary: You can customize the behavior of
spatie/laravel-medialibraryby editing theconfig/medialibrary.phpfile. - EasyPack: If your
alokadev/easypackpackage has its own configuration (e.g.,config/easypack.phpwithin the package), it will be published to your application'sconfigdirectory. You can then modify it as needed.
Usage
Once installed and configured, you can use the functionalities provided by spatie/laravel-permission (for managing roles and permissions) and spatie/laravel-medialibrary (for managing file uploads and associations) as per their respective documentation.
License
EasyPack is open-sourced software licensed under the MIT license.