filament-spatie-laravel-backup icon indicating copy to clipboard operation
filament-spatie-laravel-backup copied to clipboard

Plugin [filament-spatie-backup] is not registered for panel [admin].

Open pepe84 opened this issue 1 year ago • 2 comments

I am using Laravel 10, Filament v3, Livewire v3 and plugin last version:

"laravel/framework": "^10.0",
"filament/filament": "^3.0-stable",
"livewire/livewire": "^3.0",
"shuvroroy/filament-spatie-laravel-backup": "^2.2",

I've registered the plugin with a custom page:

<?php

namespace App\Providers\Filament;

...
use ShuvroRoy\FilamentSpatieLaravelBackup\FilamentSpatieLaravelBackupPlugin;
use App\Filament\Pages\Backups;

class AdminPanelProvider extends PanelProvider
{
    public function panel(Panel $panel): Panel
    {       
        return $panel
            ->default()
            ->id('admin')
            ->path('admin')
            ->login()
            ->colors([
                'primary' => Color::Emerald,
            ])
            ->discoverResources(in: app_path('Filament/Resources'), for: 'App\\Filament\\Resources')
            ->discoverPages(in: app_path('Filament/Pages'), for: 'App\\Filament\\Pages')
            ->pages([
                Pages\Dashboard::class,
            ])
            ->discoverWidgets(in: app_path('Filament/Widgets'), for: 'App\\Filament\\Widgets')
            ->widgets([
                Widgets\AccountWidget::class,
                Widgets\FilamentInfoWidget::class,
                \App\Filament\Widgets\ShortcodesList::class
            ])
            ->middleware([
                EncryptCookies::class,
                AddQueuedCookiesToResponse::class,
                StartSession::class,
                AuthenticateSession::class,
                ShareErrorsFromSession::class,
                VerifyCsrfToken::class,
                SubstituteBindings::class,
                DisableBladeIconComponents::class,
                DispatchServingFilamentEvent::class,
            ])
            ->authMiddleware([
                Authenticate::class,
            ])
            ->plugin(
                SpatieLaravelTranslatablePlugin::make()
                    ->defaultLocales(array_keys(config('laravellocalization.supportedLocales', ['en' => 'English']))),
                FilamentSpatieLaravelHealthPlugin::make()
                    ->usingPage(HealthCheckResults::class),
                FilamentSpatieLaravelBackupPlugin::make()
                    ->usingPage(Backups::class),
                FilamentClearCachePlugin::make(),
            );
    }
}
<?php
 
namespace App\Filament\Pages;
 
use ShuvroRoy\FilamentSpatieLaravelBackup\Pages\Backups as BaseBackups;
use Illuminate\Contracts\Support\Htmlable;
 
class Backups extends BaseBackups
{
    protected static ?string $navigationIcon = 'heroicon-o-server';
 
    public function getHeading(): string | Htmlable
    {
        return __('Application Backups');
    }
 
    public static function getNavigationGroup(): ?string
    {
        return __('Admin');
    }
}

The page appears correctly at admin menu:

Captura de pantalla de 2024-08-03 10-50-52

When I enter to page, "Plugin [filament-spatie-backup] is not registered for panel [admin]" error appears. I've published assets and language files. I don't know why is happening.

You can see stack error here.

pepe84 avatar Aug 03 '24 08:08 pepe84

@pepe84, ran into this same issue. See here for details: https://www.answeroverflow.com/m/1192802009548595320

solution is to load this plugin FIRST in the panel, above all others in the ->plugins([])

hope this helps!

sparkison avatar Mar 11 '25 17:03 sparkison

Hi, @shuvroroy. Please fix the problem with a new issue creating process. This repository has the wrong configurations, and users are unable to create a new issue here. After that, I can create a new issue about Filament 2 compatibility, and I'll open a PR.

RChutchev avatar Mar 25 '25 23:03 RChutchev