@@ -30,28 +30,43 @@ public function __construct(Command $command)
30
30
protected static function updatePackageArray (array $ packages )
31
31
{
32
32
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 ;
38
40
}
39
41
40
42
public function install ()
41
43
{
42
44
static ::updatePackages ();
45
+ static ::updateWebpackConfiguration ();
43
46
static ::updateSass ();
44
47
static ::updateBootstrapping ();
45
48
static ::removeNodeModules ();
46
49
}
47
50
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
+
48
61
/**
49
62
* Update the Sass files for the application.
50
63
*
51
64
* @return void
52
65
*/
53
66
protected static function updateSass ()
54
67
{
68
+ (new Filesystem )->ensureDirectoryExists (resource_path ('sass ' ));
69
+
55
70
copy (__DIR__ .'/../adminlte-stubs/bootstrap/_variables.scss ' , resource_path ('sass/_variables.scss ' ));
56
71
copy (__DIR__ .'/../adminlte-stubs/bootstrap/app.scss ' , resource_path ('sass/app.scss ' ));
57
72
}
@@ -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