Skip to content

Commit d86e57e

Browse files
committed
[EH] update readme
1 parent c5a840c commit d86e57e

File tree

1 file changed

+11
-24
lines changed

1 file changed

+11
-24
lines changed

README.md

Lines changed: 11 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,16 @@
88
[![Quality Score][ico-code-quality]][link-code-quality]
99
[![Total Downloads][ico-downloads]][link-downloads]
1010

11-
This is a package developed by us for internal use. It is supposed to help us during development and save plenty of time by automating many steps while creating typical entities. You can write your own Services (have to implement `Webfactor\Laravel\Generators\Contracts\ServiceInterface`) and register them in the `generators.php` config file, or use this as an inspiration for a own implementation.
11+
This is a package developed by us for internal use. It is supposed to help us during development and save plenty of time by automating many steps while creating typical CRUD entities with [Laravel Backpack](https://laravel-backpack.readme.io/docs). You can write your own Services (they have to implement `Webfactor\Laravel\Generators\Contracts\ServiceInterface`) and register them in the `generators.php` config file, or use this package as an inspiration for your own implementation.
1212

1313
## Install
1414

15-
Via Composer
15+
### Via Composer
16+
17+
This package is indended to be used only for development, not for production. Because of that we recommend to use `require-dev`:
1618

1719
``` bash
18-
$ composer require-dev webfactor/laravel-generators
20+
composer require-dev webfactor/laravel-generators
1921
```
2022

2123
## Usage
@@ -42,31 +44,22 @@ With `{--ide=}` option you can define your preferred IDE to open all automatical
4244

4345
In your service class you have to define the path to the file generated by this service. Then add `$this->addLatestFileToIdeStack();` and all files of the stack will be opened by `Webfactor\Laravel\Generators\Services\OpenIdeService` (should be placed at the end of the `services`-array in `generators.php)
4446

47+
Example:
48+
4549
```php
4650
<?php
4751

48-
namespace Webfactor\Laravel\Generators\Services;
49-
50-
use Webfactor\Laravel\Generators\Contracts\ServiceAbstract;
51-
use Webfactor\Laravel\Generators\Contracts\ServiceInterface;
52-
53-
class SeederService extends ServiceAbstract implements ServiceInterface
52+
class ExampleService extends ServiceAbstract implements ServiceInterface
5453
{
55-
protected $relativeToBasePath = 'database/seeds';
54+
protected $relativeToBasePath = 'path/to/file';
5655

5756
public function call()
5857
{
59-
$this->command->call('make:seeder', [
60-
'name' => $this->getName($this->command->entity),
61-
]);
58+
// do some magic
6259

60+
// searches for latest file (using modified date) in given directory and adds it to the stack
6361
$this->addLatestFileToIdeStack();
6462
}
65-
66-
public function getName(string $entity): string
67-
{
68-
return ucfirst(str_plural($entity)) . 'TableSeeder';
69-
}
7063
}
7164
```
7265

@@ -78,12 +71,6 @@ Feel free to write your own Services that fit your purposes!
7871

7972
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
8073

81-
## Testing
82-
83-
``` bash
84-
$ composer test
85-
```
86-
8774
## Contributing
8875

8976
Please see [CONTRIBUTING](CONTRIBUTING.md) and [CODE_OF_CONDUCT](CODE_OF_CONDUCT.md) for details.

0 commit comments

Comments
 (0)