Skip to content

Commit 1ad9ba0

Browse files
author
RIonut
committed
Updated Readme
1 parent 0cf0153 commit 1ad9ba0

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,30 @@ In `config/app.php` at 'providers' add:
1919

2020
`php artisan make:repo {modelName}`
2121

22-
This creates a new repo in app/Repository
23-
Ex: `php artisan make:repo Product` will create `app/Repository/ProductRepository.php`
22+
This creates a new repo in app/Repositories
23+
Ex: `php artisan make:repo Product` will create `app/Repositories/ProductRepository.php`
2424

2525
in constructor of `ProductRepository.php` the model will be setup to use
2626
`App\Models\Product` and `$this->model = $model` `$model` being the instance of Product.
2727

2828
`php artisan make:service {serviceName}`
2929

30-
This creates a new service in app/Service
30+
This creates a new service in app/Services
3131
ex: `php artisan make:repo ProductSearch` will create `app/Service/ProductSearchService.php`
3232

33+
`php artisan make:logic {modelName}`
34+
This creates a new service in app/Services and a new repo in app/Repositories
35+
Ex: `php artisan make:logic Product` will create `app/Repositories/ProductRepository.php` and `app/Services/ProductService.php`
36+
3337
in the constructor of 'ProductSearchService.php` you can inject all the repositories you need
3438
in order to perform the business logic you want.
3539

3640
`ProductSearchService` can be injected in methods of a controller, command or other service.
3741

3842

43+
44+
45+
3946
```php
4047
use App\Service\ProductSearchService
4148
```

0 commit comments

Comments
 (0)