File tree 6 files changed +63
-9
lines changed 6 files changed +63
-9
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ COPY composer.json ./
16
16
17
17
COPY composer.lock ./
18
18
19
- RUN composer install --no-dev --no- scripts --no-autoloader
19
+ RUN composer install --no-scripts --no-autoloader
20
20
21
21
COPY . /var/www/html/
22
22
Original file line number Diff line number Diff line change 2
2
3
3
namespace App \Console \Commands ;
4
4
5
- use App \Services \Installation \AppInstallationService ;
6
5
use Illuminate \Console \Command ;
6
+ use App \Services \Installation \AppInstallationService ;
7
7
8
8
class InstallApp extends Command
9
9
{
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace App \Console \Commands ;
4
+
5
+ use Illuminate \Console \Command ;
6
+ use App \Services \Installation \AppInstallationService ;
7
+
8
+ /**
9
+ * Class ResetDemoApp
10
+ * @package App\Console\Commands
11
+ */
12
+ class ResetDemoApp extends Command
13
+ {
14
+
15
+ /**
16
+ * @var string
17
+ */
18
+ protected $ signature = 'demo:reset ' ;
19
+
20
+
21
+ /**
22
+ * @var string
23
+ */
24
+ protected $ description = 'Reset the application state for the demo site. ' ;
25
+
26
+
27
+ /**
28
+ * ResetDemoApp constructor.
29
+ */
30
+ public function __construct ()
31
+ {
32
+ parent ::__construct ();
33
+ }
34
+
35
+
36
+ /**
37
+ *
38
+ */
39
+ public function handle ()
40
+ {
41
+ $ service = app (AppInstallationService::class);
42
+ $ this ->info ('cleaning up ' );
43
+ $ this ->call ('migrate:refresh ' );
44
+ $ this ->info ('Installing the app ' );
45
+ $ service ->installApp ([
46
+ 'name ' => 'Api Demo Admin ' ,
47
+ 'email ' => 'admin@admin.com ' ,
48
+ 'password ' => 'secret123456789 ' ,
49
+ 'password_confirmation ' => 'secret123456789 '
50
+ ]);
51
+ $ this ->info ('Seed the database ' );
52
+ $ this ->call ('db:seed ' );
53
+ $ this ->info ('Done ' );
54
+ }
55
+ }
Original file line number Diff line number Diff line change 3
3
namespace App \Console ;
4
4
5
5
use App \Console \Commands \InstallApp ;
6
+ use App \Console \Commands \ResetDemoApp ;
6
7
use Illuminate \Console \Scheduling \Schedule ;
7
8
use Illuminate \Foundation \Console \Kernel as ConsoleKernel ;
8
9
@@ -14,7 +15,9 @@ class Kernel extends ConsoleKernel
14
15
* @var array
15
16
*/
16
17
protected $ commands = [
17
- InstallApp::class
18
+ InstallApp::class,
19
+ // this is just for the demo, you can remove this on your application
20
+ ResetDemoApp::class
18
21
];
19
22
20
23
/**
Original file line number Diff line number Diff line change 19
19
'name ' => $ faker ->name ,
20
20
'uuid ' => $ faker ->uuid ,
21
21
'email ' => $ faker ->unique ()->safeEmail ,
22
- 'password ' => $ password ?: $ password = 'secret ' ,
22
+ 'password ' => $ password ?: $ password = bcrypt ( 'secret ' ) ,
23
23
'remember_token ' => str_random (10 ),
24
24
];
25
25
});
Original file line number Diff line number Diff line change @@ -70,11 +70,7 @@ Then run `php artisan passport:install`
70
70
71
71
Run ` php artisan app:install ` and fill out the information of the admin user.
72
72
73
- Run ` yarn install ` to install node dependencies
74
-
75
- Run ` yarn dev ` to compile the CSS and JS
76
-
77
- You should be done with the basic configuration.
73
+ You should be done with the basic installation and configuration.
78
74
79
75
## Tests
80
76
You can’t perform that action at this time.
0 commit comments