laravel-package-skeleton maintained by gergo-tar
Laravel Package Skeleton
This package provides a modern, interactive skeleton for building Laravel packages with best practices and essential development tools.
🚀 How It Works
-
Clone the skeleton:
git clone https://github.com/gergo-tar/laravel-plugin-skeleton my-package cd my-package -
Run the configuration script: First, run Composer's autoloader dump to ensure classes are properly loaded:
composer dump-autoloadRun the configurator>
php configure.php- The script will prompt for author, vendor, package, and feature options.
- Based on your selections, it generates all necessary files, and cleans up unused templates.
-
Start developing your package!
- All selected features (config, migrations, commands, etc.) are ready to use.
- Testing infrastructure (Pest) and dev tools (PHPStan, Rector) are pre-configured.
✨ Conditional Features
- Configuration file: Only included if selected during setup. If enabled, you can publish it with:
php artisan vendor:publish --tag="my-package-config" - Migrations: Only included if selected. Publish with:
php artisan vendor:publish --tag="my-package-migrations" - Commands: Only included if selected. Usage instructions will be added for each command.
- Facade, Views, Routes, Translations, Assets: Documented and included only if selected.
🛠️ Development Tools
- Pest: Modern testing framework
- PHPStan (Larastan): Static analysis
- Commitlint: Enforces conventional commit messages
- Rector: Automated refactoring
- Pint: Code style fixer
📦 Usage
- After configuration, your package is ready for local development or publishing.
- See
CONFIGURATIONfor a full guide to the configuration process and available features.
📄 License
MIT. See LICENSE for more information.
Your package, your way, in seconds! 🚀