@@ -30,17 +30,20 @@ public function __construct(Command $command)
30
30
protected static function updatePackageArray (array $ packages )
31
31
{
32
32
return [
33
- 'bootstrap ' => '^4.1.0 ' ,
34
- 'jquery ' => '^3.2 ' ,
35
- 'popper.js ' => '^1.12 ' ,
36
- '@coreui/coreui ' => '^3.2.2 ' ,
37
- '@coreui/icons ' => '^1.0.1 ' ,
38
- ] + $ packages ;
33
+ 'bootstrap ' => '^4.1.0 ' ,
34
+ 'jquery ' => '^3.2 ' ,
35
+ 'popper.js ' => '^1.12 ' ,
36
+ 'sass ' => '^1.15.2 ' ,
37
+ 'sass-loader ' => '^8.0.0 ' ,
38
+ '@coreui/coreui ' => '^3.2.2 ' ,
39
+ '@coreui/icons ' => '^1.0.1 ' ,
40
+ ] + $ packages ;
39
41
}
40
42
41
43
public function install ()
42
44
{
43
45
static ::updatePackages ();
46
+ static ::updateWebpackConfiguration ();
44
47
static ::updateSass ();
45
48
static ::updateBootstrapping ();
46
49
static ::removeNodeModules ();
@@ -53,7 +56,19 @@ public function install()
53
56
*/
54
57
protected static function updateSass ()
55
58
{
56
- copy (__DIR__ .'/../coreui-stubs/bootstrap/app.scss ' , resource_path ('sass/app.scss ' ));
59
+ (new Filesystem ())->ensureDirectoryExists (resource_path ('sass ' ));
60
+
61
+ copy (__DIR__ . '/../coreui-stubs/bootstrap/app.scss ' , resource_path ('sass/app.scss ' ));
62
+ }
63
+
64
+ /**
65
+ * Update the Webpack configuration.
66
+ *
67
+ * @return void
68
+ */
69
+ protected static function updateWebpackConfiguration ()
70
+ {
71
+ copy (__DIR__ . '/../adminlte-stubs/bootstrap/webpack.mix.js ' , base_path ('webpack.mix.js ' ));
57
72
}
58
73
59
74
/**
@@ -63,8 +78,8 @@ protected static function updateSass()
63
78
*/
64
79
protected static function updateBootstrapping ()
65
80
{
66
- copy (__DIR__ . '/../coreui-stubs/bootstrap/bootstrap.js ' , resource_path ('js/bootstrap.js ' ));
67
- copy (__DIR__ . '/../coreui-stubs/bootstrap/app.js ' , resource_path ('js/app.js ' ));
81
+ copy (__DIR__ . '/../coreui-stubs/bootstrap/bootstrap.js ' , resource_path ('js/bootstrap.js ' ));
82
+ copy (__DIR__ . '/../coreui-stubs/bootstrap/app.js ' , resource_path ('js/app.js ' ));
68
83
}
69
84
70
85
public function installAuth ()
@@ -115,7 +130,7 @@ protected function scaffoldAuth()
115
130
116
131
file_put_contents (
117
132
base_path ('routes/web.php ' ),
118
- "Auth::routes(); \n\nRoute::get('/home', ' HomeController@ index')->name('home'); \n\n" ,
133
+ "Auth::routes(); \n\nRoute::get('/home', [App\Http\Controllers\ HomeController::class, ' index'] )->name('home'); \n\n" ,
119
134
FILE_APPEND
120
135
);
121
136
0 commit comments