GeoSot / filament-env-editor

MIT License
16 stars 4 forks source link

Installation Error Class "GeoSot\FilamentEnvEditor\FilamentLEnvEditorPlugin" not found #1

Closed momostafa closed 5 months ago

momostafa commented 6 months ago

Hi thanks for the free plugin I got below error after registering the plugin

PHP 8.2.16 Laravel 11.4.0 Filament 3.x.x latest version

` Error

Class "GeoSot\FilamentEnvEditor\FilamentLEnvEditorPlugin" not found

at app/Providers/Filament/AdminPanelProvider.php:57 53▕ ) 54▕ ->plugin(\TomatoPHP\FilamentSettingsHub\FilamentSettingsHubPlugin::make()) 55▕ ->plugin(\TomatoPHP\FilamentAlerts\FilamentAlertsPlugin::make())
56▕ ->plugin(\BezhanSalleh\FilamentShield\FilamentShieldPlugin::make()) ➜ 57▕ ->plugin(\GeoSot\FilamentEnvEditor\FilamentLEnvEditorPlugin::make() 58▕ ->navigationGroup('System Tools') 59▕ ->navigationLabel('My Env') 60▕ ->navigationIcon('heroicon-o-cog-8-tooth') 61▕ ->navigationSort(1)

  +35 vendor frames 

36 [internal]:0 Illuminate\Foundation\Application::Illuminate\Foundation{closure}(Object(Filament\FilamentServiceProvider)) +5 vendor frames

42 artisan:35 Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))`

GeoSot commented 6 months ago

Apologies for my delay. Did you find a solution on our problem?

momostafa commented 6 months ago

Hi, unfortunately I couldn't resolve the problem myself I am fairly new to Laravel

aeq-dev commented 5 months ago

It's a typo ! Just edit it as this :

use GeoSot\FilamentEnvEditor\FilamentEnvEditorPlugin;

FilamentEnvEditorPlugin::make()
                        ->navigationGroup('System Tools')
                        ->navigationLabel('My Env')
                        ->navigationIcon('heroicon-o-cog-8-tooth')
                        ->navigationSort(1)
                        ->slug('env-editor')
GeoSot commented 5 months ago

thanks a lot @aeq-dev

aeq-dev commented 5 months ago

You're welcome @GeoSot Another small issue, you need to add this : public array $data = []; in ViewEnv page

aeq-dev commented 5 months ago

Also a last typo when we use a custom page :D ->viewPage(CustomEnvPage::class)

GeoSot commented 5 months ago

You're welcome @GeoSot Another small issue, you need to add this : public array $data = []; in ViewEnv page

Can you please explain me. I am not sure of this

aeq-dev commented 5 months ago

You're welcome @GeoSot Another small issue, you need to add this : public array $data = []; in ViewEnv page

Can you please explain me. I am not sure of this

Laravel 10, I get this error :

Property [$data] not found on component: [geo-sot.filament-env-editor.pages.view-env]

So I've just added it using a custom page :


use GeoSot\FilamentEnvEditor\Pages\ViewEnv;

class EditEnv extends ViewEnv
{
    public array $data = [];

}
 FilamentEnvEditorPlugin::make()
                        ->navigationGroup('Settings')
                        ->viewPage(EditEnv::class)
GeoSot commented 5 months ago

@aeq-dev I applied your suggestion in main branch. I would appreciate your confirmation on this

aeq-dev commented 5 months ago

Yes it works fine like this, thanks :) Please build a new release in order to upgrade :)