kennethsolomon/make-service
最新稳定版本:v1.1.2
Composer 安装命令:
composer require kennethsolomon/make-service
包简介
Can run 'php artisan make:service Foobar' to create new Services.
README 文档
README
Type composer require kennethsolomon/make-service --dev
How to use
Just type php artisan make:service FoobarService
Inside Controller you can use
- Import FoobarService in your controller ->
use App\Services\FoobarService; $FoobarService = FoobarService::getInstance();$FoobarService->foo()# Asumming that there has foo() method inside your service
or
protected $FoobarService; public function __construct(FoobarService $FoobarService) { $this->FoobarService = $FoobarService; }
$this->FoobarService->bar()# Assuming that there has bar() method inside your service
统计信息
- 总下载量: 16
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-01-03