Skip to content

Commit 08e4a7e

Browse files
committed
docs updated
1 parent 1aaf07c commit 08e4a7e

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

README.md

+17
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
- <a href="#use-built-in-methods">Use built-in methods</a>
6262
- <a href="#create-a-criteria">Create a Criteria</a>
6363
- <a href="#scope-filter-and-order">Scope, Filter, and Order</a>
64+
- <a href="#artisan-commands">Artisan Commands</a>
6465
- <a href="#testing">Testing</a>
6566

6667
## Installation
@@ -449,6 +450,22 @@ class MyScope extends ScopeAbstract
449450
}
450451
```
451452

453+
### Artisan Commands
454+
455+
Package provides useful artisan command:
456+
457+
```bash
458+
php artisan repository:generate Models/Order --scope=Search
459+
```
460+
461+
#### It'll generate several classes for ```App\Models\Order```:
462+
463+
Main repository: ```App\Repositories\Orders\OrdersRepository```
464+
465+
Main scopes class: ```App\Repositories\Orders\Scopes\OrdersScopes```
466+
467+
Individual search scope class: ```App\Repositories\Orders\Scopes\SearchOrdersScope```
468+
452469
## Testing
453470

454471
The coverage of the package is <a href="https://www.awes.io/?utm_source=github&amp;utm_medium=shields"><img src="https://repo.pkgkit.com/4GBWO/awes-io/repository/badges/master/coverage.svg" alt="Coverage report"></a>.

docs/index.md

+17
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
- <a href="#use-built-in-methods">Use built-in methods</a>
1414
- <a href="#create-a-criteria">Create a Criteria</a>
1515
- <a href="#scope-filter-and-order">Scope, Filter, and Order</a>
16+
- <a href="#artisan-commands">Artisan Commands</a>
1617
- <a href="#testing">Testing</a>
1718

1819
## Installation
@@ -401,6 +402,22 @@ class MyScope extends ScopeAbstract
401402
}
402403
```
403404

405+
### Artisan Commands
406+
407+
Package provides useful artisan command:
408+
409+
```bash
410+
php artisan repository:generate Models/Order --scope=Search
411+
```
412+
413+
#### It'll generate several classes for ```App\Models\Order```:
414+
415+
Main repository: ```App\Repositories\Orders\OrdersRepository```
416+
417+
Main scopes class: ```App\Repositories\Orders\Scopes\OrdersScopes```
418+
419+
Individual search scope class: ```App\Repositories\Orders\Scopes\SearchOrdersScope```
420+
404421
## Testing
405422

406423
The coverage of the package is <a href="https://www.awes.io/?utm_source=github&amp;utm_medium=shields"><img src="https://repo.pkgkit.com/4GBWO/awes-io/repository/badges/master/coverage.svg" alt="Coverage report"></a>.

0 commit comments

Comments
 (0)