From 87c6122a32cbf3f74ae9999192e3e74eec416e9c Mon Sep 17 00:00:00 2001 From: stephenjude Date: Sat, 2 Mar 2024 13:12:07 +0100 Subject: [PATCH] WIP --- README.md | 6 ------ composer.json | 8 ++------ src/Commands/FilamentJetstreamCommand.php | 10 +++------- stubs/App/Filament/Pages/EditProfile.php | 2 +- stubs/App/Filament/Pages/EditTeam.php | 2 +- 5 files changed, 7 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 2ad9d64..87afc5d 100644 --- a/README.md +++ b/README.md @@ -49,12 +49,6 @@ You can remove the `--teams` and `--api` arguments if you don't want those featu ![Edit Team](art/api_token.png) -You can publish the config file with: - -```bash -php artisan vendor:publish --tag="filament-jetstream-config" -``` - ## Testing ```bash diff --git a/composer.json b/composer.json index 7359bb8..c5b1aee 100644 --- a/composer.json +++ b/composer.json @@ -40,8 +40,7 @@ }, "autoload": { "psr-4": { - "FilamentJetstream\\FilamentJetstream\\": "src/", - "FilamentJetstream\\FilamentJetstream\\Database\\Factories\\": "database/factories/" + "FilamentJetstream\\FilamentJetstream\\": "src/" } }, "autoload-dev": { @@ -67,10 +66,7 @@ "laravel": { "providers": [ "FilamentJetstream\\FilamentJetstream\\FilamentJetstreamServiceProvider" - ], - "aliases": { - "FilamentJetstream": "FilamentJetstream\\FilamentJetstream\\Facades\\FilamentJetstream" - } + ] } }, "minimum-stability": "dev", diff --git a/src/Commands/FilamentJetstreamCommand.php b/src/Commands/FilamentJetstreamCommand.php index 3670fad..b931773 100644 --- a/src/Commands/FilamentJetstreamCommand.php +++ b/src/Commands/FilamentJetstreamCommand.php @@ -191,13 +191,9 @@ protected function configurePanel() ->before('.php')->prepend("App\Providers\Filament")->append('::class,')->toString()) ->each(fn($value) => $this->replaceInFile(search: $value, replace: '', path: config_path('app.php'))); - $filesystem->copyDirectory(__DIR__.'/../../stubs/App/Providers/Filament', app_path('Providers/Filament')); - $filesystem->copyDirectory(__DIR__.'/../../stubs/App/Filament', app_path('Filament')); - $filesystem->copyDirectory(__DIR__.'/../../stubs/App/Listeners', app_path('Listeners')); - $filesystem->copyDirectory( - __DIR__.'/../../stubs/resources/views/filament/pages', - resource_path('views/filament/pages') - ); + $filesystem->copyDirectory(__DIR__.'/../../stubs/App', app_path('/')); + + $filesystem->copyDirectory(__DIR__.'/../../stubs/resources/views/filament', resource_path('views/filament')); copy(__DIR__.'/../../stubs/routes/web.php', base_path('routes/web.php')); diff --git a/stubs/App/Filament/Pages/EditProfile.php b/stubs/App/Filament/Pages/EditProfile.php index f100ff6..2e1dc94 100644 --- a/stubs/App/Filament/Pages/EditProfile.php +++ b/stubs/App/Filament/Pages/EditProfile.php @@ -7,7 +7,7 @@ class EditProfile extends Page { protected static ?string $navigationIcon = 'heroicon-o-user-circle'; - protected static string $view = 'filament-jetstream::pages.edit-profile'; + protected static string $view = 'filament.pages.edit-profile'; protected static ?string $navigationLabel = 'Profile'; diff --git a/stubs/App/Filament/Pages/EditTeam.php b/stubs/App/Filament/Pages/EditTeam.php index 3c944bb..3024b1e 100644 --- a/stubs/App/Filament/Pages/EditTeam.php +++ b/stubs/App/Filament/Pages/EditTeam.php @@ -6,7 +6,7 @@ use Filament\Pages\Tenancy\EditTenantProfile; class EditTeam extends EditTenantProfile { - protected static string $view = 'filament-jetstream::pages.edit-team'; + protected static string $view = 'filament.pages.edit-team'; protected static ?int $navigationSort = 2;