aagjalpankaj / laravel-package-template
Composer package template for Laravel
Package info
github.com/aagjalpankaj/laravel-package-template
pkg:composer/aagjalpankaj/laravel-package-template
Requires
- php: ^8.2
- illuminate/config: ^11.0|^12.0
- illuminate/support: ^11.0|^12.0
Requires (Dev)
- laravel/pint: ^1.21
- orchestra/testbench: ^10.1
- pestphp/pest: ^3.8
- rector/rector: ^2.0
This package is auto-updated.
Last update: 2026-03-15 20:11:08 UTC
README
A comprehensive starter template for creating high-quality Laravel packages with modern development tools and best practices.
๐ Table of Contents
- Overview
- Features
- Requirements
- Installation
- Quick Start
- Development Workflow
- Testing
- Code Quality
- Contributing
- Changelog
- License
- Support
๐ฏ Overview
This template provides a solid foundation for developing Laravel packages with industry-standard tools and configurations. It follows Laravel package development best practices and includes everything you need to create, test, and maintain professional-grade packages.
โจ Features
-
๐งช Comprehensive Testing Suite
- PestPHP for Feature, Unit & Architecture testing
- Laravel Workbench for integration testing
- Pre-configured test environments
-
๐ง Code Quality Tools
- Laravel Pint for consistent code styling
- Rector for automated refactoring and upgrades
- GitHub Actions for continuous integration
-
๐ฆ Package Development Tools
- Pre-configured composer.json with optimal settings
- Service provider boilerplate
- Configuration and migration publishing
-
๐ Developer Experience
- Automated CI/CD workflows
- Development helper commands
- Documentation templates
๐ Requirements
- PHP 8.1 or higher
- Laravel 10.0 or higher
- Composer 2.0 or higher
๐ Installation
Using GitHub Template
- Click the "Use this template" button on the GitHub repository
- Create your new repository
- Clone your new repository locally
Using Composer
composer create-project aagjalpankaj/laravel-package-template:dev-main your-package-name
cd your-package-name
โก Quick Start
After creating your package from this template, follow these steps:
1. Customize Package Information
Replace the following placeholders throughout your codebase:
| Placeholder | Replace With | Example |
|---|---|---|
Aagjalpankaj |
Your vendor namespace | YourCompany |
LaravelPackageTemplate |
Your package class name | AwesomePackage |
laravel-package-template |
Your package name | awesome-package |
2. Update Package Configuration
Edit the following files with your package details:
composer.json- Package metadata, dependencies, and autoloadingconfig/laravel-package-template.php- Package configuration filesrc/LaravelPackageTemplateServiceProvider.php- Service provider
Available Commands
| Command | Description |
|---|---|
composer ci |
Run complete CI suite (tests, code style, static analysis) |
composer ci:fix |
Fix code style and refactor issues automatically |
composer test |
Run the full test suite |
composer test:unit |
Run unit tests only |
composer test:feature |
Run feature tests only |
composer test:arch |
Run architecture tests only |
composer pint |
Fix code style issues |
composer rector |
Apply automated refactoring |
Continuous Integration
GitHub Actions automatically run:
- โ Tests across multiple PHP versions
- โ Code style checks
- โ Static analysis
- โ Dependency security scanning