File tree Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,10 @@ class SeedDefaultsCommand extends Command
1515 *
1616 * @var string
1717 */
18- protected $ signature = 'flexible-content-block-pages:seed ' ;
18+ protected $ signature = 'flexible-content-block-pages:seed
19+ {--only-home-page : Only seed the home page}
20+ {--only-settings : Only seed the settings}
21+ {--only-tag-types : Only seed the tag types} ' ;
1922
2023 /**
2124 * The console command description.
@@ -31,9 +34,17 @@ public function handle(): void
3134 {
3235 $ this ->info ('Seeding default home page and settings... ' );
3336
34- $ this ->seedHomePage ();
35- $ this ->seedSettings ();
36- $ this ->seedTagTypes ();
37+ $ noOptions = ! $ this ->hasOption ('only-home-page ' ) && ! $ this ->hasOption ('only-settings ' ) && ! $ this ->hasOption ('only-tag-types ' );
38+
39+ if ($ noOptions || $ this ->hasOption ('only-home-page ' )) {
40+ $ this ->seedHomePage ();
41+ }
42+ if ($ noOptions || $ this ->hasOption ('only-settings ' )) {
43+ $ this ->seedSettings ();
44+ }
45+ if ($ noOptions || $ this ->hasOption ('only-tag-types ' )) {
46+ $ this ->seedTagTypes ();
47+ }
3748
3849 $ this ->info ('Default home page and settings seeded successfully! ' );
3950 }
You can’t perform that action at this time.
0 commit comments