File tree Expand file tree Collapse file tree 2 files changed +16
-7
lines changed Expand file tree Collapse file tree 2 files changed +16
-7
lines changed Original file line number Diff line number Diff line change 22
33namespace Cachet \Commands ;
44
5+ use Cachet \Database \Seeders \DatabaseSeeder ;
56use Cachet \Settings \AppSettings ;
67use Cachet \Settings \Attributes \Description ;
78use Illuminate \Console \Command ;
@@ -28,17 +29,29 @@ public function handle(AppSettings $settings)
2829
2930 if (confirm ('Do you want to configure Cachet before installing? ' , true )) {
3031 info ('Configuring Cachet... ' );
31- $ this ->configureDatabaseSettings ($ settings );
32+ $ this ->configureEnvironmentSettings ();
33+ $ settings = $ this ->configureDatabaseSettings ($ settings );
3234 }
3335
3436 info ('Installing Cachet... ' );
3537
38+ $ this ->call ('filament:assets ' );
39+
40+ $ this ->call ('migrate ' , ['--seed ' => true , '--seeder ' => DatabaseSeeder::class]);
41+
42+ $ settings ->save ();
43+
3644 info ('Cachet is installed ⚡ ' );
3745
3846 return Command::SUCCESS ;
3947 }
4048
41- protected function configureDatabaseSettings (AppSettings $ settings ): void
49+ protected function configureEnvironmentSettings (): void
50+ {
51+ //@todo configure environment variables inside cachet.php
52+ }
53+
54+ protected function configureDatabaseSettings (AppSettings $ settings ): AppSettings
4255 {
4356 collect (
4457 (new ReflectionClass ($ settings ))->getProperties (ReflectionProperty::IS_PUBLIC )
@@ -55,6 +68,6 @@ protected function configureDatabaseSettings(AppSettings $settings): void
5568 })
5669 ->pluck ('name ' );
5770
58- $ settings-> save () ;
71+ return $ settings ;
5972 }
6073}
Original file line number Diff line number Diff line change @@ -18,12 +18,8 @@ workbench:
1818 to : public/vendor/cachethq/cachet
1919 build :
2020 - asset-publish
21- - filament:assets
2221 - create-sqlite-db
2322 - db:wipe
24- - migrate:refresh :
25- --seed : true
26- --seeder : Cachet\Database\Seeders\DatabaseSeeder
2723 - cachet:install
2824 assets :
2925 - query-builder-config
You can’t perform that action at this time.
0 commit comments