We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent af1f9c3 commit cf0c963Copy full SHA for cf0c963
1 file changed
src/Filament2faServiceProvider.php
@@ -46,12 +46,20 @@ public function packageBooted(): void
46
47
protected function publishMigrations()
48
{
49
- $files = Collection::make(File::files(base_path('vendor/laragear/two-factor/database/migrations')))
+ $path = __DIR__ . '/../vendor/laragear/two-factor/database/migrations';
50
+
51
+ if (!is_dir($path)) {
52
+ // Don't throw if the package isn't installed or path is invalid in CI
53
+ return;
54
+ }
55
56
+ $files = Collection::make(File::files($path))
57
->mapWithKeys(fn(\SplFileInfo $file): array => [
58
$file->getRealPath() => Str::of($file->getFileName())
59
->prepend($this->app->databasePath('migrations/'))
60
->toString(),
61
]);
62
63
$this->publishes($files->toArray(), 'filament-2fa-migrations');
64
}
65
0 commit comments