Skip to content

Commit

Permalink
ReOrder default endpoints generated.
Browse files Browse the repository at this point in the history
  • Loading branch information
maurobonfietti committed Jun 26, 2020
1 parent 77886f9 commit 8486b64
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Command/CrudGeneratorService.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ private function updateRoutes()
{
$routes = '
$app->get("/'.$this->entity.'", "App\Controller\\'.$this->entityUpper.'\GetAll");
$app->get("/'.$this->entity.'/[{id}]", "App\Controller\\'.$this->entityUpper.'\GetOne");
$app->post("/'.$this->entity.'", "App\Controller\\'.$this->entityUpper.'\Create");
$app->put("/'.$this->entity.'/[{id}]", "App\Controller\\'.$this->entityUpper.'\Update");
$app->delete("/'.$this->entity.'/[{id}]", "App\Controller\\'.$this->entityUpper.'\Delete");
$app->get("/'.$this->entity.'/{id}", "App\Controller\\'.$this->entityUpper.'\GetOne");
$app->put("/'.$this->entity.'/{id}", "App\Controller\\'.$this->entityUpper.'\Update");
$app->delete("/'.$this->entity.'/{id}", "App\Controller\\'.$this->entityUpper.'\Delete");
';
$file = __DIR__ . '/../../../../../src/App/Routes.php';
$content = file_get_contents($file);
Expand Down

0 comments on commit 8486b64

Please sign in to comment.