Home > Enterprise >  Laravel 8 backpack error on "php artisan backpack:crud-operation SendNotification"
Laravel 8 backpack error on "php artisan backpack:crud-operation SendNotification"

Time:10-24

I installed Laravel 8 with backpack 5.1 and I run php artisan backpack:crud-operation SendNotification I got error:

root@9139092f4397:/var/www/khm-hrms# php artisan backpack:crud-operation SendNotification

   BadMethodCallException 

  Method Illuminate\Support\Stringable::lcfirst does not exist.

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

  • Bad Method Call: Did you mean Illuminate\Support\Stringable::ucfirst() ? 

       16 vendor frames 
  17  artisan:37
      Illuminate\Foundation\Console\Kernel::handle()

Does anyone know what the issue might be ? I cannot find a solution online.

CodePudding user response:

lcfirst is used as part of Laravel Str::class. Read more here.

Look at this issue: https://github.com/Laravel-Backpack/Generators/pull/149

You can update your package to the latest version, and this should be solved.

CodePudding user response:

Do you mean I need to update my Backpack package or PHP?

because my Laravel is 8 and PHP version 8

  • Related