From c27cb634eae551dd52d94d5bdbddb2ee9dbb7a1c Mon Sep 17 00:00:00 2001 From: hafijul233 Date: Sat, 6 Jul 2024 22:10:34 +0000 Subject: [PATCH] Fix styling --- config/crud.php | 4 ++-- src/Commands/CrudMakeCommand.php | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/config/crud.php b/config/crud.php index dab1610..6e103c0 100644 --- a/config/crud.php +++ b/config/crud.php @@ -22,7 +22,7 @@ | command with default laravel commands. You can change it to `make:crud` | Default is : 'laraflow:make-crud' */ - 'command' => "laraflow:make-crud", + 'command' => 'laraflow:make-crud', /* |-------------------------------------------------------------------------- @@ -56,7 +56,7 @@ | {CONTROLLER} => full namespace controller path | */ - 'route_template' => << <<<'HTML' Route::apiResource('{RESOURCE_URI}', {CONTROLLER}); HTML, diff --git a/src/Commands/CrudMakeCommand.php b/src/Commands/CrudMakeCommand.php index dbd6999..7b65aad 100644 --- a/src/Commands/CrudMakeCommand.php +++ b/src/Commands/CrudMakeCommand.php @@ -214,7 +214,7 @@ private function updateRouteFile(): void file_put_contents($filePath, $fileContent); } - private function renderRouteTemplate():string + private function renderRouteTemplate(): string { $singleName = Str::kebab(basename($this->getResourceName())); @@ -222,17 +222,17 @@ private function renderRouteTemplate():string $controller = GeneratorPath::convertPathToNamespace( '\\' - . $this->getModuleName() - . '\\' - . GenerateConfigReader::read('controller')->getNamespace() - . '\\' - . $this->getResourceName() - . 'Controller::class' + .$this->getModuleName() + .'\\' + .GenerateConfigReader::read('controller')->getNamespace() + .'\\' + .$this->getResourceName() + .'Controller::class' ); $layout = config('crud.route_template', "Route::apiResource('{RESOURCE_URI}', {CONTROLLER});\n"); - $template = $layout . "\n\n //DO NOT REMOVE THIS LINE//\n"; + $template = $layout."\n\n //DO NOT REMOVE THIS LINE//\n"; $replacements = [ '{RESOURCE_URI}' => $resourceName,