1010use Laravel \Ui \Presets \Preset ;
1111use Symfony \Component \Finder \SplFileInfo ;
1212
13-
1413class StislaPreset extends Preset
1514{
1615 /** @var Command */
@@ -27,30 +26,30 @@ public function __construct(Command $command, $isFortify = false)
2726 /**
2827 * Update the given package array.
2928 *
30- * @param array $packages
29+ * @param array $packages
3130 *
3231 * @return array
3332 */
3433 protected static function updatePackageArray (array $ packages , $ configurationKey )
3534 {
3635 $ stislaPackages = [
3736 'dependencies ' => [
38- " bootstrap " => " ^4.0.0 " ,
39- " jquery " => " ^3.2 " ,
40- " popper.js " => " ^1.12 " ,
41- " @fortawesome/fontawesome-free " => " ^5.13.1 " ,
42- " jquery.nicescroll " => " ^3.7.6 " ,
43- " vue-template-compiler " => " ^2.6.12 " ,
44- " vue " => " ^2.5.17 " ,
45- " datatables.net-dt " => " ^1.10.21 " ,
46- " jsrender " => " ^1.0.5 " ,
47- " sweetalert " => " ^1.1.3 " ,
48- " select2 " => " ^4.0.13 " ,
49- " izitoast " => " ^1.4.0 " ,
37+ ' bootstrap ' => ' ^4.0.0 ' ,
38+ ' jquery ' => ' ^3.2 ' ,
39+ ' popper.js ' => ' ^1.12 ' ,
40+ ' @fortawesome/fontawesome-free ' => ' ^5.13.1 ' ,
41+ ' jquery.nicescroll ' => ' ^3.7.6 ' ,
42+ ' vue-template-compiler ' => ' ^2.6.12 ' ,
43+ ' vue ' => ' ^2.5.17 ' ,
44+ ' datatables.net-dt ' => ' ^1.10.21 ' ,
45+ ' jsrender ' => ' ^1.0.5 ' ,
46+ ' sweetalert ' => ' ^1.1.3 ' ,
47+ ' select2 ' => ' ^4.0.13 ' ,
48+ ' izitoast ' => ' ^1.4.0 ' ,
5049 ],
5150 'devDependencies ' => [
52- " webpack " => " ^5.23.0 " ,
53- ]
51+ ' webpack ' => ' ^5.23.0 ' ,
52+ ],
5453 ];
5554
5655 return $ stislaPackages [$ configurationKey ] + $ packages ;
@@ -75,7 +74,6 @@ protected static function updateWebpackConfiguration()
7574 copy (__DIR__ .'/../stisla-stubs/vendors/bootstrap/webpack.mix.js ' , base_path ('webpack.mix.js ' ));
7675 }
7776
78-
7977 public function installAuth ()
8078 {
8179 $ viewsPath = LaravelUtils::getViewPath ();
@@ -84,26 +82,26 @@ public function installAuth()
8482
8583 $ this ->scaffoldAuth ();
8684
87- if (! $ this ->isFortify ) {
85+ if (!$ this ->isFortify ) {
8886 $ this ->scaffoldController ();
8987 }
9088 }
9189
9290 protected function ensureDirectoriesExist ($ viewsPath )
9391 {
94- if (! file_exists ($ viewsPath .'layouts ' )) {
92+ if (!file_exists ($ viewsPath .'layouts ' )) {
9593 mkdir ($ viewsPath .'layouts ' , 0755 , true );
9694 }
9795
98- if (! file_exists ($ viewsPath .'profile ' )) {
96+ if (!file_exists ($ viewsPath .'profile ' )) {
9997 mkdir ($ viewsPath .'profile ' , 0755 , true );
10098 }
10199
102- if (! file_exists ($ viewsPath .'auth ' )) {
100+ if (!file_exists ($ viewsPath .'auth ' )) {
103101 mkdir ($ viewsPath .'auth ' , 0755 , true );
104102 }
105103
106- if (! file_exists ($ viewsPath .'auth/passwords ' )) {
104+ if (!file_exists ($ viewsPath .'auth/passwords ' )) {
107105 mkdir ($ viewsPath .'auth/passwords ' , 0755 , true );
108106 }
109107 }
@@ -128,7 +126,7 @@ private function addHomeRoute()
128126
129127 protected function scaffoldController ()
130128 {
131- if (! is_dir ($ directory = app_path ('Http/Controllers/Auth ' ))) {
129+ if (!is_dir ($ directory = app_path ('Http/Controllers/Auth ' ))) {
132130 mkdir ($ directory , 0755 , true );
133131 }
134132
@@ -149,7 +147,7 @@ protected function scaffoldAuth()
149147
150148 $ this ->addHomeRoute ();
151149
152- if (! $ this ->isFortify ) {
150+ if (!$ this ->isFortify ) {
153151 $ this ->addAuthRoutes ();
154152 }
155153
@@ -159,7 +157,6 @@ protected function scaffoldAuth()
159157 $ filesystem ->copyDirectory (__DIR__ .'/../stisla-stubs/views/profile ' , resource_path ('views/profile ' ));
160158 $ filesystem ->copy (__DIR__ .'/../stisla-stubs/home.blade.php ' , resource_path ('views/home.blade.php ' ));
161159
162-
163160 collect ($ filesystem ->allFiles (base_path ('vendor/laravel/ui/stubs/migrations ' )))
164161 ->each (function (SplFileInfo $ file ) use ($ filesystem ) {
165162 $ filesystem ->copy (
0 commit comments