mckenziearts/laravel-command
Dev-only Artisan generators for Laravel: quickly scaffold templated repositories, helpers, and observers. Adds make:repository and related commands to create boilerplate files, with configurable model namespaces for non-standard app structures.
Architecture Fit
The laravel-command package provides a lightweight, Laravel-native solution for scaffolding repositories, observers, and helpers—core components of Laravel applications using the Repository Pattern or Observer Pattern. It fits well within Laravel’s ecosystem, particularly for teams adopting structured architectures (e.g., DDD, layered applications) or needing standardized code generation. The package’s focus on code generation (not runtime logic) makes it a non-intrusive addition, ideal for projects where boilerplate reduction is a priority. However, its scope is narrow: it does not replace full-fledged CLI frameworks (e.g., Symfony Console) but complements them by automating repetitive file creation.
Integration Feasibility Integration is highly feasible due to:
App\Models → Database\Factories).make:repository requiring a model).--force, --namespace flags).--namespace support).Key Questions
make:model)?App\Console\Commands)?use statements)?Artisan::command()) be simpler for our needs?Stack Fit The package is optimized for Laravel monoliths and fits best in stacks using:
App\Models\User → App\Repositories\UserRepository).created(), deleted()).App\Helpers\MediaHelper).
Not ideal for:Migration Path
Repository classes).Repository class) with the package.
php artisan make:repository User
User).make_repository.sh) in favor of Artisan commands.UserRepository is missing).Compatibility
.gitignore or IDE-specific configs).Sequencing
composer require mckenziearts/laravel-command --dev
config/app.php (or AppServiceProvider for local-only use).Maintenance
UserRepository.php).Repository) requires manual updates.CHANGELOG.md or wiki.php artisan make:repository User --force).Support
bash script.sh with php artisan deploy:check).Scaling
time php artisan make:repository User).Failure Modes
How can I help you explore Laravel packages today?