Skip to content

Commit 2f22790

Browse files
copy database migrations when using auth scaffold - closes #91
1 parent 82e7b54 commit 2f22790

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/TailwindCssPreset.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,17 @@ protected static function scaffoldAuth()
109109
FILE_APPEND
110110
);
111111

112-
(new Filesystem)->copyDirectory(__DIR__.'/tailwindcss-stubs/resources/views', resource_path('views'));
112+
tap(new Filesystem, function ($filesystem) {
113+
$filesystem->copyDirectory(__DIR__.'/tailwindcss-stubs/resources/views', resource_path('views'));
114+
115+
collect($filesystem->allFiles(base_path('vendor/laravel/ui/stubs/migrations')))
116+
->each(function (SplFileInfo $file) use ($filesystem) {
117+
$filesystem->copy(
118+
$file->getPathname(),
119+
database_path('migrations/'.$file->getFilename())
120+
);
121+
});
122+
});
113123
}
114124

115125
protected static function compileControllerStub()

0 commit comments

Comments
 (0)