Skip to content

Commit d3648b8

Browse files
author
Admin
committed
Fix info messages order
1 parent f25180f commit d3648b8

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

src/Console/MakeLaravelCrudWizard.php

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,30 +97,34 @@ public function handle(int $try = 0): void
9797
\array_diff($columns, ['created_at', 'updated_at', 'id'])
9898
);
9999

100+
if ($decorated = $this->option('decorated')) {
101+
$this->makeDecoratorService->makeCompleteDecoratorFile($this->resourceName, $ns, $columns);
102+
$this->makeMiddlewareService->makeCompleteMiddlewareFile($this->resourceName, $ns);
103+
}
104+
100105
$this->info('---------------------------------------------------------------------------------------------');
101106
$this->info('TODO:');
102107

103108
if ($this->ignoreError) {
104109
$this->info('- Create migration,');
105110
}
106111

112+
$this->info('- Fill the model\'s properties and relations,');
113+
107114
if ($composedPk) {
108115
$this->info('- Replace composed primary keys id_1, id_2, ... in model and service,');
109116
}
110117

111-
$this->info('- Fill the model\'s properties and relations,');
112118
$this->info('- Define validations in controller,');
113-
$this->info('- Expose resource in DbCrudMap::MODEL_FQN_TO_CONTROLLER_MAP.');
114-
115-
if ($this->option('decorated')) {
116-
$this->makeDecoratorService->makeCompleteDecoratorFile($this->resourceName, $ns, $columns);
117-
$this->makeMiddlewareService->makeCompleteMiddlewareFile($this->resourceName, $ns);
118119

120+
if ($decorated) {
119121
$this->info('- Fill the decorator,');
120122
$this->info('- Register middleware decorator as route middleware,');
121123
$this->info('- Use the middleware alias as middleware in your crud route definition for each method.');
122124
}
123125

126+
$this->info('- Expose resource in DbCrudMap::MODEL_FQN_TO_CONTROLLER_MAP.');
127+
124128
$this->info('---------------------------------------------------------------------------------------------');
125129
$this->info('Thank you for using laravel-crud-wizard-generator');
126130
$this->info('For more details see: https://github.com/macropay-solutions/laravel-crud-wizard-generator');

0 commit comments

Comments
 (0)