diff --git a/src/Common/GeneratorConfig.php b/src/Common/GeneratorConfig.php index 48e9e7440..e5d7d1020 100755 --- a/src/Common/GeneratorConfig.php +++ b/src/Common/GeneratorConfig.php @@ -134,7 +134,7 @@ public function loadPaths() $paths->dataTables = config( 'laravel_generator.path.datatables', app_path('DataTables/') - ).$namespacePrefix; + ).$viewPrefix.$this->modelNames->dashedPlural.'/'; $paths->livewireTables = config( 'laravel_generator.path.livewire_tables', @@ -176,7 +176,7 @@ public function loadPaths() $paths->views = config( 'laravel_generator.path.views', resource_path('views/') - ).$viewPrefix.$this->modelNames->snakePlural.'/'; + ).$viewPrefix.$this->modelNames->dashedPlural.'/'; $paths->seeder = config('laravel_generator.path.seeder', database_path('seeders/')); $paths->databaseSeeder = config('laravel_generator.path.database_seeder', database_path('seeders/DatabaseSeeder.php')); diff --git a/src/DTOs/GeneratorPrefixes.php b/src/DTOs/GeneratorPrefixes.php index 75440a1b9..19ea24427 100644 --- a/src/DTOs/GeneratorPrefixes.php +++ b/src/DTOs/GeneratorPrefixes.php @@ -44,7 +44,7 @@ public function mergeRoutePrefix(array $prefixes) continue; } - $this->route .= '.'.Str::camel($prefix); + $this->route .= '.'.Str::kebab($prefix); } $this->route = ltrim($this->route, '.'); @@ -57,7 +57,7 @@ public function mergeNamespacePrefix(array $prefixes) continue; } - $this->namespace .= '\\'.Str::title($prefix); + $this->namespace .= '\\'.Str::studly($prefix); } $this->namespace = ltrim($this->namespace, '\\'); @@ -70,7 +70,7 @@ public function mergeViewPrefix(array $prefixes) continue; } - $this->view .= '/'.Str::snake($prefix); + $this->view .= '/'.Str::kebab($prefix); } $this->view = ltrim($this->view, '/'); diff --git a/src/Generators/Scaffold/ViewGenerator.php b/src/Generators/Scaffold/ViewGenerator.php index 8cb64ca85..ae01b429f 100755 --- a/src/Generators/Scaffold/ViewGenerator.php +++ b/src/Generators/Scaffold/ViewGenerator.php @@ -162,7 +162,7 @@ protected function generateIndex() switch ($this->config->tableType) { case 'datatables': case 'blade': - $tableReplaceString = "@include('".$this->config->prefixes->getViewPrefixForInclude().$this->config->modelNames->snakePlural.".table')"; + $tableReplaceString = "@include('".$this->config->prefixes->getViewPrefixForInclude().$this->config->modelNames->dashedPlural.".table')"; break; case 'livewire':