Skip to content

Commit

Permalink
copy database migrations when using auth scaffold - closes #91
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeldyrynda committed Mar 7, 2020
1 parent 82e7b54 commit 2f22790
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/TailwindCssPreset.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,17 @@ protected static function scaffoldAuth()
FILE_APPEND
);

(new Filesystem)->copyDirectory(__DIR__.'/tailwindcss-stubs/resources/views', resource_path('views'));
tap(new Filesystem, function ($filesystem) {
$filesystem->copyDirectory(__DIR__.'/tailwindcss-stubs/resources/views', resource_path('views'));

collect($filesystem->allFiles(base_path('vendor/laravel/ui/stubs/migrations')))
->each(function (SplFileInfo $file) use ($filesystem) {
$filesystem->copy(
$file->getPathname(),
database_path('migrations/'.$file->getFilename())
);
});
});
}

protected static function compileControllerStub()
Expand Down

0 comments on commit 2f22790

Please sign in to comment.