Skip to content

Commit 2167909

Browse files
committed
more structure change
1 parent ab578e2 commit 2167909

15 files changed

+68
-225
lines changed

src/Commands/JobMakeCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ protected function getDestinationFilePath()
8787
{
8888
$path = module()->getModulePath($this->getModuleAlias());
8989

90-
$jobPath = GenerateConfigReader::read('jobs');
90+
$jobPath = GenerateConfigReader::read('job');
9191

9292
return $path . $jobPath->getPath() . '/' . $this->getFileName() . '.php';
9393
}

src/Commands/ListenerMakeCommand.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@ protected function getTemplateContents()
6161
$module = $this->getModule();
6262

6363
return (new Stub($this->getStubName(), [
64-
'ALIAS' => $module->getAlias(),
65-
'NAMESPACE' => $this->getClassNamespace($module),
66-
'EVENTNAME' => $this->getEventName($module),
67-
'SHORTEVENTNAME' => $this->option('event'),
68-
'CLASS' => $this->getClass(),
64+
'ALIAS' => $module->getAlias(),
65+
'NAMESPACE' => $this->getClassNamespace($module),
66+
'EVENTNAME' => $this->getEventName($module),
67+
'SHORTEVENTNAME' => $this->option('event'),
68+
'CLASS' => $this->getClass(),
6969
]))->render();
7070
}
7171

src/Commands/MailMakeCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ protected function getDestinationFilePath()
7171
{
7272
$path = module()->getModulePath($this->getModuleAlias());
7373

74-
$mailPath = GenerateConfigReader::read('emails');
74+
$mailPath = GenerateConfigReader::read('email');
7575

7676
return $path . $mailPath->getPath() . '/' . $this->getFileName() . '.php';
7777
}

src/Commands/MiddlewareMakeCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ protected function getDestinationFilePath()
7272
{
7373
$path = module()->getModulePath($this->getModuleAlias());
7474

75-
$middlewarePath = GenerateConfigReader::read('filter');
75+
$middlewarePath = GenerateConfigReader::read('middleware');
7676

7777
return $path . $middlewarePath->getPath() . '/' . $this->getFileName() . '.php';
7878
}

src/Commands/NotificationMakeCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ protected function getDestinationFilePath()
5858
{
5959
$path = module()->getModulePath($this->getModuleAlias());
6060

61-
$notificationPath = GenerateConfigReader::read('notifications');
61+
$notificationPath = GenerateConfigReader::read('notification');
6262

6363
return $path . $notificationPath->getPath() . '/' . $this->getFileName() . '.php';
6464
}

src/Commands/PolicyMakeCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ protected function getDestinationFilePath()
7272
{
7373
$path = module()->getModulePath($this->getModuleAlias());
7474

75-
$policyPath = GenerateConfigReader::read('policies');
75+
$policyPath = GenerateConfigReader::read('policy');
7676

7777
return $path . $policyPath->getPath() . '/' . $this->getFileName() . '.php';
7878
}

src/Commands/ProviderMakeCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,12 @@ protected function getTemplateContents()
8383
'NAME' => $this->getFileName(),
8484
'STUDLY_NAME' => $module->getStudlyName(),
8585
'MODULE_NAMESPACE' => $this->laravel['module']->config('namespace'),
86-
'PATH_VIEWS' => GenerateConfigReader::read('views')->getPath(),
86+
'PATH_VIEWS' => GenerateConfigReader::read('view')->getPath(),
8787
'PATH_LANG' => GenerateConfigReader::read('lang')->getPath(),
8888
'PATH_CONFIG' => GenerateConfigReader::read('config')->getPath(),
8989
'MIGRATIONS_PATH' => GenerateConfigReader::read('migration')->getPath(),
9090
'FACTORIES_PATH' => GenerateConfigReader::read('factory')->getPath(),
91+
'ROUTES_PATH' => GenerateConfigReader::read('route')->getPath(),
9192
]))->render();
9293
}
9394
/**

src/Commands/RouteProviderMakeCommand.php

Lines changed: 0 additions & 114 deletions
This file was deleted.

src/Commands/stubs/json.stub

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
"active": 1,
66
"order": 0,
77
"providers": [
8-
"$MODULE_NAMESPACE$\\$STUDLY_NAME$\\Providers\\Main",
9-
"$MODULE_NAMESPACE$\\$STUDLY_NAME$\\Providers\\Route"
8+
"$MODULE_NAMESPACE$\\$STUDLY_NAME$\\Providers\\Main"
109
],
1110
"aliases": {},
1211
"files": [],

src/Commands/stubs/route-provider.stub

Lines changed: 0 additions & 69 deletions
This file was deleted.

0 commit comments

Comments
 (0)