Skip to content
This repository was archived by the owner on Jun 22, 2022. It is now read-only.

Commit 7918b0b

Browse files
committed
fix: minor fixes from conflict
1 parent 16171d5 commit 7918b0b

File tree

1 file changed

+6
-34
lines changed

1 file changed

+6
-34
lines changed

src/CoreUIPreset.php

+6-34
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@
55
use Illuminate\Console\Command;
66
use Illuminate\Container\Container;
77
use Illuminate\Filesystem\Filesystem;
8-
use Illuminate\Support\Str;
98
use InfyOm\GeneratorHelpers\LaravelUtils;
109
use Laravel\Ui\Presets\Preset;
11-
use Symfony\Component\Finder\SplFileInfo;
1210

1311
class CoreUIPreset extends Preset
1412
{
@@ -29,11 +27,11 @@ public function __construct(Command $command)
2927
protected static function updatePackageArray(array $packages)
3028
{
3129
return [
32-
'bootstrap' => '^4.1.0',
33-
'jquery' => '^3.2',
34-
'popper.js' => '^1.12',
30+
'bootstrap' => '^4.1.0',
31+
'jquery' => '^3.2',
32+
'popper.js' => '^1.12',
3533
'@coreui/coreui' => '^3.2.2',
36-
"@coreui/icons" => "^1.0.1",
34+
'@coreui/icons' => '^1.0.1',
3735
] + $packages;
3836
}
3937

@@ -73,7 +71,6 @@ public function installAuth()
7371
$this->ensureDirectoriesExist($viewsPath);
7472

7573
$this->scaffoldAuth();
76-
$this->scaffoldController();
7774
}
7875

7976
protected function ensureDirectoriesExist($viewsPath)
@@ -91,23 +88,6 @@ protected function ensureDirectoriesExist($viewsPath)
9188
}
9289
}
9390

94-
protected function scaffoldController()
95-
{
96-
if (!is_dir($directory = app_path('Http/Controllers/Auth'))) {
97-
mkdir($directory, 0755, true);
98-
}
99-
100-
$filesystem = new Filesystem;
101-
102-
collect($filesystem->allFiles(base_path('vendor/laravel/ui/stubs/Auth')))
103-
->each(function (SplFileInfo $file) use ($filesystem) {
104-
$filesystem->copy(
105-
$file->getPathname(),
106-
app_path('Http/Controllers/Auth/'.Str::replaceLast('.stub', '.php', $file->getFilename()))
107-
);
108-
});
109-
}
110-
11191
protected function scaffoldAuth()
11292
{
11393
file_put_contents(app_path('Http/Controllers/HomeController.php'), $this->compileHomeControllerStub());
@@ -118,19 +98,11 @@ protected function scaffoldAuth()
11898
FILE_APPEND
11999
);
120100

121-
tap(new Filesystem, function ($filesystem) {
101+
tap(new Filesystem(), function ($filesystem) {
122102

123103
$filesystem->copyDirectory(__DIR__.'/../coreui-stubs/auth', resource_path('views/auth'));
124104
$filesystem->copyDirectory(__DIR__.'/../coreui-stubs/layouts', resource_path('views/layouts'));
125105
$filesystem->copy(__DIR__.'/../coreui-stubs/home.blade.php', resource_path('views/home.blade.php'));
126-
127-
collect($filesystem->allFiles(base_path('vendor/laravel/ui/stubs/migrations')))
128-
->each(function (SplFileInfo $file) use ($filesystem) {
129-
$filesystem->copy(
130-
$file->getPathname(),
131-
database_path('migrations/'.$file->getFilename())
132-
);
133-
});
134106
});
135107
}
136108

@@ -142,4 +114,4 @@ protected function compileHomeControllerStub()
142114
file_get_contents(base_path('vendor/laravel/ui/src/Auth/stubs/controllers/HomeController.stub'))
143115
);
144116
}
145-
}
117+
}

0 commit comments

Comments
 (0)