You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
12
12
13
13
## Install
14
14
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`:
@@ -42,31 +44,22 @@ With `{--ide=}` option you can define your preferred IDE to open all automatical
42
44
43
45
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)
44
46
47
+
Example:
48
+
45
49
```php
46
50
<?php
47
51
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
54
53
{
55
-
protected $relativeToBasePath = 'database/seeds';
54
+
protected $relativeToBasePath = 'path/to/file';
56
55
57
56
public function call()
58
57
{
59
-
$this->command->call('make:seeder', [
60
-
'name' => $this->getName($this->command->entity),
61
-
]);
58
+
// do some magic
62
59
60
+
// searches for latest file (using modified date) in given directory and adds it to the stack
0 commit comments