kennethsolomon / make-service
Can run 'php artisan make:service Foobar' to create new Services.
Package info
github.com/kennethsolomon/make-service-package
pkg:composer/kennethsolomon/make-service
v1.1.2
2023-01-04 01:15 UTC
This package is auto-updated.
Last update: 2026-03-04 08:40:21 UTC
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