|
@@ 224-239 (lines=16) @@
|
| 221 |
|
|
| 222 |
|
protected function generateUi(FileGenerator $generator, array $properties) |
| 223 |
|
{ |
| 224 |
|
$generator->directory('classes', function ($generator) use ($properties) { |
| 225 |
|
$migration_class = $properties['addon_class'].'_1_0'; |
| 226 |
|
|
| 227 |
|
// $generator->keepDirectory('Console/Commands'); |
| 228 |
|
|
| 229 |
|
$generator->directory('Database/Migrations') |
| 230 |
|
->file($migration_class.'.php')->template('classes/Database/Migration.php', array_merge($properties, ['class_name' => $migration_class])); |
| 231 |
|
// $generator->keepDirectory('Database/Seeds'); |
| 232 |
|
|
| 233 |
|
$generator->templateDirectory('Http', $properties); |
| 234 |
|
// $generator->keepDirectory('Http/Middleware'); |
| 235 |
|
|
| 236 |
|
$generator->templateDirectory('Providers', array_merge($properties, ['migration_class_name' => $migration_class])); |
| 237 |
|
|
| 238 |
|
$generator->keepDirectory('Services'); |
| 239 |
|
}); |
| 240 |
|
|
| 241 |
|
$generator->keepDirectory('config'); |
| 242 |
|
|
|
@@ 299-310 (lines=12) @@
|
| 296 |
|
|
| 297 |
|
protected function generateUiSample(FileGenerator $generator, array $properties) |
| 298 |
|
{ |
| 299 |
|
$generator->directory('classes', function ($generator) use ($properties) { |
| 300 |
|
$migration_class = $properties['addon_class'].'_1_0'; |
| 301 |
|
|
| 302 |
|
$generator->directory('Database/Migrations') |
| 303 |
|
->file($migration_class.'.php')->template('classes/Database/Migration.php', array_merge($properties, ['class_name' => $migration_class])); |
| 304 |
|
|
| 305 |
|
$generator->templateDirectory('Http', $properties); |
| 306 |
|
|
| 307 |
|
$generator->templateDirectory('Providers', array_merge($properties, ['migration_class_name' => $migration_class])); |
| 308 |
|
|
| 309 |
|
$generator->keepDirectory('Services'); |
| 310 |
|
}); |
| 311 |
|
|
| 312 |
|
$generator->keepDirectory('config'); |
| 313 |
|
|