|
@@ 277-292 (lines=16) @@
|
| 274 |
|
|
| 275 |
|
protected function generateUi(FileGenerator $generator, array $properties) |
| 276 |
|
{ |
| 277 |
|
$generator->directory('classes', function ($generator) use ($properties) { |
| 278 |
|
$migration_class = $properties['addon_class'].'_1_0'; |
| 279 |
|
|
| 280 |
|
// $generator->keepDirectory('Console/Commands'); |
| 281 |
|
|
| 282 |
|
$generator->directory('Database/Migrations') |
| 283 |
|
->file($migration_class.'.php')->template('classes/Database/Migration.php', array_merge($properties, ['class_name' => $migration_class])); |
| 284 |
|
// $generator->keepDirectory('Database/Seeds'); |
| 285 |
|
|
| 286 |
|
$generator->templateDirectory('Http', $properties); |
| 287 |
|
// $generator->keepDirectory('Http/Middleware'); |
| 288 |
|
|
| 289 |
|
$generator->templateDirectory('Providers', array_merge($properties, ['migration_class_name' => $migration_class])); |
| 290 |
|
|
| 291 |
|
$generator->keepDirectory('Services'); |
| 292 |
|
}); |
| 293 |
|
|
| 294 |
|
$generator->keepDirectory('config'); |
| 295 |
|
|
|
@@ 352-363 (lines=12) @@
|
| 349 |
|
|
| 350 |
|
protected function generateUiSample(FileGenerator $generator, array $properties) |
| 351 |
|
{ |
| 352 |
|
$generator->directory('classes', function ($generator) use ($properties) { |
| 353 |
|
$migration_class = $properties['addon_class'].'_1_0'; |
| 354 |
|
|
| 355 |
|
$generator->directory('Database/Migrations') |
| 356 |
|
->file($migration_class.'.php')->template('classes/Database/Migration.php', array_merge($properties, ['class_name' => $migration_class])); |
| 357 |
|
|
| 358 |
|
$generator->templateDirectory('Http', $properties); |
| 359 |
|
|
| 360 |
|
$generator->templateDirectory('Providers', array_merge($properties, ['migration_class_name' => $migration_class])); |
| 361 |
|
|
| 362 |
|
$generator->keepDirectory('Services'); |
| 363 |
|
}); |
| 364 |
|
|
| 365 |
|
$generator->keepDirectory('config'); |
| 366 |
|
|