@@ -30,28 +30,43 @@ public function __construct(Command $command)
3030 protected static function updatePackageArray (array $ packages )
3131 {
3232 return [
33- 'bootstrap ' => '^4.0.0 ' ,
34- 'jquery ' => '^3.2 ' ,
35- 'popper.js ' => '^1.12 ' ,
36- 'admin-lte ' => '^3.0 ' ,
37- ] + $ packages ;
33+ 'bootstrap ' => '^4.0.0 ' ,
34+ 'jquery ' => '^3.2 ' ,
35+ 'popper.js ' => '^1.12 ' ,
36+ 'admin-lte ' => '^3.0 ' ,
37+ 'sass ' => '^1.15.2 ' ,
38+ 'sass-loader ' => '^8.0.0 ' ,
39+ ] + $ packages ;
3840 }
3941
4042 public function install ()
4143 {
4244 static ::updatePackages ();
45+ static ::updateWebpackConfiguration ();
4346 static ::updateSass ();
4447 static ::updateBootstrapping ();
4548 static ::removeNodeModules ();
4649 }
4750
51+ /**
52+ * Update the Webpack configuration.
53+ *
54+ * @return void
55+ */
56+ protected static function updateWebpackConfiguration ()
57+ {
58+ copy (__DIR__ .'/../adminlte-stubs/bootstrap/webpack.mix.js ' , base_path ('webpack.mix.js ' ));
59+ }
60+
4861 /**
4962 * Update the Sass files for the application.
5063 *
5164 * @return void
5265 */
5366 protected static function updateSass ()
5467 {
68+ (new Filesystem )->ensureDirectoryExists (resource_path ('sass ' ));
69+
5570 copy (__DIR__ .'/../adminlte-stubs/bootstrap/_variables.scss ' , resource_path ('sass/_variables.scss ' ));
5671 copy (__DIR__ .'/../adminlte-stubs/bootstrap/app.scss ' , resource_path ('sass/app.scss ' ));
5772 }
@@ -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