lozemc/laravel-services
最新稳定版本:11.0
Composer 安装命令:
composer require lozemc/laravel-services
包简介
Simple command to create Service class in Laravel
README 文档
README
Installation
To get started with Laravel Service Command, simply require the package via Composer:
composer require lozemc/laravel-services
Installation for Laravel 10.x
Next, add the following line to the $commands array in your /app/Console/Kernel.php file:
protected $commands = [ // ... \App\Console\Commands\ServiceMakeCommand::class, ];
If the protected $commands array does not exist, you will need to add it.
Installation for Laravel 11.x
Then add the following line to the returned array in /bootstrap/providers.php:
return [ // ... Lozemc\Services\Providers\MakeServiceProvider::class, ];
Usage
Once installed and configured, you can use the artisan command to create a new service:
php artisan make:service PostService
This will generate a new service class named PostService in the App\Services namespace. You can then implement
your business logic within this service class.
Other
统计信息
- 总下载量: 132
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-02-25