Hasnayeen / themes

Themes for Filament panels.
MIT License
217 stars 30 forks source link

[Bug]: Call to undefined method Filament\Support\Colors\Color::all() #2

Closed waleed-GRT closed 1 year ago

waleed-GRT commented 1 year ago

What happened?

After installing this plugin and registering it in the Filament AdminPanelProvider, I encountered the following error: "I received an error stating 'Call to undefined method Filament\Support\Colors\Color::all()'."

Also

Not working (Class "App\Providers\Filament\Hasnayeen\Themes\ThemesPlugin" not found)

 public function panel(Panel $panel): Panel
    {
        return $panel
            ->plugin(
                Hasnayeen\Themes\ThemesPlugin::make()
            );
    }

Working

use Hasnayeen\Themes\ThemesPlugin;

 public function panel(Panel $panel): Panel
    {
        return $panel
            ->plugin(
                ThemesPlugin::make()
            );
    }

How to reproduce the bug

After registering the plugin in AdminPanelProvider, I encountered an error. By the way, I'm testing this on Docker.

Package Version

3.0

PHP Version

8.1

Laravel Version

10.10

Which operating systems does with happen with?

No response

Notes

No response

waleed-GRT commented 1 year ago

On "themes:upgrade" i also got this error


php artisan themes:upgrade
>>

   BadMethodCallException 

  Method Hasnayeen\Themes\Commands\UpgradeCommand::copyAsset does not exist.

  at vendor/laravel/framework/src/Illuminate/Macroable/Traits/Macroable.php:112
    108▕      */
    109▕     public function __call($method, $parameters)
    110▕     {
    111▕         if (! static::hasMacro($method)) {
  ➜ 112▕             throw new BadMethodCallException(sprintf(
    113▕                 'Method %s::%s does not exist.', static::class, $method
    114▕             ));
    115▕         }
    116▕

  i   Bad Method Call: Did you mean Hasnayeen\Themes\Commands\UpgradeCommand::complete() ?

      +13 vendor frames

  14  artisan:35
      Illuminate\Foundation\Console\Kernel::handle()
Hasnayeen commented 1 year ago

On "themes:upgrade" i also got this error


php artisan themes:upgrade
>>

   BadMethodCallException 

  Method Hasnayeen\Themes\Commands\UpgradeCommand::copyAsset does not exist.

  at vendor/laravel/framework/src/Illuminate/Macroable/Traits/Macroable.php:112
    108▕      */
    109▕     public function __call($method, $parameters)
    110▕     {
    111▕         if (! static::hasMacro($method)) {
  ➜ 112▕             throw new BadMethodCallException(sprintf(
    113▕                 'Method %s::%s does not exist.', static::class, $method
    114▕             ));
    115▕         }
    116▕

  i   Bad Method Call: Did you mean Hasnayeen\Themes\Commands\UpgradeCommand::complete() ?

      +13 vendor frames

  14  artisan:35
      Illuminate\Foundation\Console\Kernel::handle()

A fix has been pushed for this

Hasnayeen commented 1 year ago

can you show me the exact filament version you're using?

image

waleed-GRT commented 1 year ago

image

Hasnayeen commented 1 year ago

image

run php artisan about in terminal and tell me the exact filament version please

waleed-GRT commented 1 year ago

It's a version problem. I updated the package, and it is now working.

khrnchn commented 1 year ago

It's a version problem. I updated the package, and it is now working.

hello, did you update filament or the theme plugin?

khrnchn commented 1 year ago

i still got the error despite updating the package to the latest version. in panel provider i have included these:

image

this is my filament version:

image

khrnchn commented 1 year ago

nevermind, i solved it by upgrading my filament version. thanks!

mohandtharsha commented 10 months ago

use Hasnayeen\Themes\ThemesPlugin;

can you please what is the solution