Skip to content

[Bug]: Class "Filament\Plugin\ModulesPlugin" not found #117

@bacipher

Description

@bacipher

What happened?

When performing a dump-autoload and have already registered the pluggin in your panel. When you try to do a install the plugin with: php artisan module:filament:install MyModule, you get this error.

How to reproduce the bug

Add the package and configure

composer require coolsam/modules

php artisan vendor:publish --tag="modules-config"

Register the plugin

// e.g. in App\Providers\Filament\AdminPanelProvider.php
 
use Filament\Plugin\ModulesPlugin;
public function panel(Panel $panel): Panel
{
    return $panel
        ...
        ->plugin(ModulesPlugin::make());
}

Create a Module

php artisan module:make MyModule

Install the Module

php artisan module:filament:install MyModule

Package Version

4.0

PHP Version

8.0

Laravel Version

11.9

Which operating systems does with happen with?

Linux

Notes

Suggested Solution

When registering the plugin in your panel, one should use the package namespace rather than filament namespace

// e.g. in App\Providers\Filament\AdminPanelProvider.php
 
use Coolsam\Modules\ModulesPlugin;
public function panel(Panel $panel): Panel
{
    return $panel
        ...
        ->plugin(ModulesPlugin::make());
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions