ehystiv / servrepomaker
Service/Repository class generator
Fund package maintenance!
v1.1.0
2026-06-07 19:45 UTC
Requires
- php: ^8.3
- illuminate/contracts: ^11.0|^12.0|^13.0
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- larastan/larastan: ^3.0
- laravel/pint: ^1.14
- nunomaduro/collision: ^8.1.1||^7.10.0
- orchestra/testbench: ^9.0.0||^10.0.0||^11.0.0
- pestphp/pest: ^3.0
- pestphp/pest-plugin-arch: ^3.0
- pestphp/pest-plugin-laravel: ^3.0|^4.0
- phpstan/extension-installer: ^1.3
- phpstan/phpstan-deprecation-rules: ^2.0
- phpstan/phpstan-phpunit: ^2.0
- spatie/laravel-ray: ^1.35
This package is auto-updated.
Last update: 2026-06-07 19:48:33 UTC
README
Adds Artisan commands to generate Service and Repository classes from stubs.
Supports Laravel 11, 12, and 13.
Installation
composer require --dev ehystiv/servrepomaker
Usage
php artisan make:service UserService # generates App\Http\Services\UserService.php php artisan make:repository UserRepository # generates App\Http\Repositories\UserRepository.php
Both commands prompt for the class name if omitted.
Configuration
Publish the config file to customise the default namespaces:
php artisan vendor:publish --tag="servrepomaker-config"
This creates config/servrepomaker.php:
return [ 'service_namespace' => 'App\\Http\\Services', 'repository_namespace' => 'App\\Http\\Repositories', ];
Change the values to match your project structure. The generated files will be placed accordingly.
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.