@@ -30,17 +30,20 @@ public function __construct(Command $command)
3030 protected static function updatePackageArray (array $ packages )
3131 {
3232 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 ;
3941 }
4042
4143 public function install ()
4244 {
4345 static ::updatePackages ();
46+ static ::updateWebpackConfiguration ();
4447 static ::updateSass ();
4548 static ::updateBootstrapping ();
4649 static ::removeNodeModules ();
@@ -53,7 +56,19 @@ public function install()
5356 */
5457 protected static function updateSass ()
5558 {
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 ' ));
5772 }
5873
5974 /**
@@ -63,8 +78,8 @@ protected static function updateSass()
6378 */
6479 protected static function updateBootstrapping ()
6580 {
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 ' ));
6883 }
6984
7085 public function installAuth ()
@@ -115,7 +130,7 @@ protected function scaffoldAuth()
115130
116131 file_put_contents (
117132 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" ,
119134 FILE_APPEND
120135 );
121136
0 commit comments