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 2
2
3
3
namespace Cachet \Commands ;
4
4
5
+ use Cachet \Database \Seeders \DatabaseSeeder ;
5
6
use Cachet \Settings \AppSettings ;
6
7
use Cachet \Settings \Attributes \Description ;
7
8
use Illuminate \Console \Command ;
@@ -28,17 +29,29 @@ public function handle(AppSettings $settings)
28
29
29
30
if (confirm ('Do you want to configure Cachet before installing? ' , true )) {
30
31
info ('Configuring Cachet... ' );
31
- $ this ->configureDatabaseSettings ($ settings );
32
+ $ this ->configureEnvironmentSettings ();
33
+ $ settings = $ this ->configureDatabaseSettings ($ settings );
32
34
}
33
35
34
36
info ('Installing Cachet... ' );
35
37
38
+ $ this ->call ('filament:assets ' );
39
+
40
+ $ this ->call ('migrate ' , ['--seed ' => true , '--seeder ' => DatabaseSeeder::class]);
41
+
42
+ $ settings ->save ();
43
+
36
44
info ('Cachet is installed ⚡ ' );
37
45
38
46
return Command::SUCCESS ;
39
47
}
40
48
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
42
55
{
43
56
collect (
44
57
(new ReflectionClass ($ settings ))->getProperties (ReflectionProperty::IS_PUBLIC )
@@ -55,6 +68,6 @@ protected function configureDatabaseSettings(AppSettings $settings): void
55
68
})
56
69
->pluck ('name ' );
57
70
58
- $ settings-> save () ;
71
+ return $ settings ;
59
72
}
60
73
}
Original file line number Diff line number Diff line change @@ -18,12 +18,8 @@ workbench:
18
18
to : public/vendor/cachethq/cachet
19
19
build :
20
20
- asset-publish
21
- - filament:assets
22
21
- create-sqlite-db
23
22
- db:wipe
24
- - migrate:refresh :
25
- --seed : true
26
- --seeder : Cachet\Database\Seeders\DatabaseSeeder
27
23
- cachet:install
28
24
assets :
29
25
- query-builder-config
You can’t perform that action at this time.
0 commit comments