Adds Artisan commands to generate Service and Repository classes from stubs.
Supports Laravel 11, 12, and 13.
composer require --dev ehystiv/servrepomakerphp artisan make:service UserService # generates App\Http\Services\UserService.php
php artisan make:repository UserRepository # generates App\Http\Repositories\UserRepository.phpBoth commands prompt for the class name if omitted.
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.
composer testPlease see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.