|
@@ 241-256 (lines=16) @@
|
| 238 |
|
|
| 239 |
|
protected function generateUi(FileGenerator $generator, array $properties) |
| 240 |
|
{ |
| 241 |
|
$generator->directory('classes', function ($generator) use ($properties) { |
| 242 |
|
$migration_class = $properties['addon_class'].'_1_0'; |
| 243 |
|
|
| 244 |
|
// $generator->keepDirectory('Console/Commands'); |
| 245 |
|
|
| 246 |
|
$generator->directory('Database/Migrations') |
| 247 |
|
->file($migration_class.'.php')->template('classes/Database/Migration.php', array_merge($properties, ['class_name' => $migration_class])); |
| 248 |
|
// $generator->keepDirectory('Database/Seeds'); |
| 249 |
|
|
| 250 |
|
$generator->templateDirectory('Http', $properties); |
| 251 |
|
// $generator->keepDirectory('Http/Middleware'); |
| 252 |
|
|
| 253 |
|
$generator->templateDirectory('Providers', array_merge($properties, ['migration_class_name' => $migration_class])); |
| 254 |
|
|
| 255 |
|
$generator->keepDirectory('Services'); |
| 256 |
|
}); |
| 257 |
|
|
| 258 |
|
$generator->keepDirectory('config'); |
| 259 |
|
|
|
@@ 316-327 (lines=12) @@
|
| 313 |
|
|
| 314 |
|
protected function generateUiSample(FileGenerator $generator, array $properties) |
| 315 |
|
{ |
| 316 |
|
$generator->directory('classes', function ($generator) use ($properties) { |
| 317 |
|
$migration_class = $properties['addon_class'].'_1_0'; |
| 318 |
|
|
| 319 |
|
$generator->directory('Database/Migrations') |
| 320 |
|
->file($migration_class.'.php')->template('classes/Database/Migration.php', array_merge($properties, ['class_name' => $migration_class])); |
| 321 |
|
|
| 322 |
|
$generator->templateDirectory('Http', $properties); |
| 323 |
|
|
| 324 |
|
$generator->templateDirectory('Providers', array_merge($properties, ['migration_class_name' => $migration_class])); |
| 325 |
|
|
| 326 |
|
$generator->keepDirectory('Services'); |
| 327 |
|
}); |
| 328 |
|
|
| 329 |
|
$generator->keepDirectory('config'); |
| 330 |
|
|