src/Services/MakeBackpackCrudControllerService.php 1 location
|
@@ 8-21 (lines=14) @@
|
| 5 |
|
use Webfactor\Laravel\Generators\Contracts\MakeServiceAbstract; |
| 6 |
|
use Webfactor\Laravel\Generators\Contracts\MakeServiceInterface; |
| 7 |
|
|
| 8 |
|
class MakeBackpackCrudControllerService extends MakeServiceAbstract implements MakeServiceInterface |
| 9 |
|
{ |
| 10 |
|
public function make() |
| 11 |
|
{ |
| 12 |
|
$this->command->call('make:crud-controller', [ |
| 13 |
|
'name' => $this->getName($this->entity), |
| 14 |
|
]); |
| 15 |
|
} |
| 16 |
|
|
| 17 |
|
public function getName(string $entity): string |
| 18 |
|
{ |
| 19 |
|
return ucfirst($entity); |
| 20 |
|
} |
| 21 |
|
} |
| 22 |
|
|
src/Services/MakeBackpackCrudModelService.php 1 location
|
@@ 8-21 (lines=14) @@
|
| 5 |
|
use Webfactor\Laravel\Generators\Contracts\MakeServiceAbstract; |
| 6 |
|
use Webfactor\Laravel\Generators\Contracts\MakeServiceInterface; |
| 7 |
|
|
| 8 |
|
class MakeBackpackCrudModelService extends MakeServiceAbstract implements MakeServiceInterface |
| 9 |
|
{ |
| 10 |
|
public function make() |
| 11 |
|
{ |
| 12 |
|
$this->command->call('make:crud-model', [ |
| 13 |
|
'name' => $this->getName($this->entity), |
| 14 |
|
]); |
| 15 |
|
} |
| 16 |
|
|
| 17 |
|
public function getName(string $entity): string |
| 18 |
|
{ |
| 19 |
|
return ucfirst($entity); |
| 20 |
|
} |
| 21 |
|
} |
| 22 |
|
|
src/Services/MakeBackpackCrudRequestService.php 1 location
|
@@ 8-21 (lines=14) @@
|
| 5 |
|
use Webfactor\Laravel\Generators\Contracts\MakeServiceAbstract; |
| 6 |
|
use Webfactor\Laravel\Generators\Contracts\MakeServiceInterface; |
| 7 |
|
|
| 8 |
|
class MakeBackpackCrudRequestService extends MakeServiceAbstract implements MakeServiceInterface |
| 9 |
|
{ |
| 10 |
|
public function make() |
| 11 |
|
{ |
| 12 |
|
$this->command->call('make:crud-request', [ |
| 13 |
|
'name' => $this->getName($this->entity), |
| 14 |
|
]); |
| 15 |
|
} |
| 16 |
|
|
| 17 |
|
public function getName(string $entity): string |
| 18 |
|
{ |
| 19 |
|
return ucfirst($entity); |
| 20 |
|
} |
| 21 |
|
} |
| 22 |
|
|
src/Services/MakeFactoryService.php 1 location
|
@@ 8-21 (lines=14) @@
|
| 5 |
|
use Webfactor\Laravel\Generators\Contracts\MakeServiceAbstract; |
| 6 |
|
use Webfactor\Laravel\Generators\Contracts\MakeServiceInterface; |
| 7 |
|
|
| 8 |
|
class MakeFactoryService extends MakeServiceAbstract implements MakeServiceInterface |
| 9 |
|
{ |
| 10 |
|
public function make() |
| 11 |
|
{ |
| 12 |
|
$this->command->call('make:factory', [ |
| 13 |
|
'name' => $this->getName($this->entity), |
| 14 |
|
]); |
| 15 |
|
} |
| 16 |
|
|
| 17 |
|
public function getName(string $entity): string |
| 18 |
|
{ |
| 19 |
|
return ucfirst($entity) . 'Factory'; |
| 20 |
|
} |
| 21 |
|
} |
| 22 |
|
|
src/Services/MakeSeederService.php 1 location
|
@@ 8-21 (lines=14) @@
|
| 5 |
|
use Webfactor\Laravel\Generators\Contracts\MakeServiceAbstract; |
| 6 |
|
use Webfactor\Laravel\Generators\Contracts\MakeServiceInterface; |
| 7 |
|
|
| 8 |
|
class MakeSeederService extends MakeServiceAbstract implements MakeServiceInterface |
| 9 |
|
{ |
| 10 |
|
public function make() |
| 11 |
|
{ |
| 12 |
|
$this->command->call('make:seeder', [ |
| 13 |
|
'name' => $this->getName($this->entity), |
| 14 |
|
]); |
| 15 |
|
} |
| 16 |
|
|
| 17 |
|
public function getName(string $entity): string |
| 18 |
|
{ |
| 19 |
|
return ucfirst(str_plural($entity)) . 'Seeder'; |
| 20 |
|
} |
| 21 |
|
} |
| 22 |
|
|