skip to Main Content

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 IlluminateSupportStringable::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 IlluminateSupportStringable::ucfirst() ? 

      +16 vendor frames 
  17  artisan:37
      IlluminateFoundationConsoleKernel::handle()

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

2

Answers


  1. 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.

    Login or Signup to reply.
  2. You should update Backpack package like Hefaz suggested.
    The version you got has that error and you need to bump your version to get the fix, your PHP and Laravel versions are fine.

    composer update backpack/crud.

    We are currently on 5.4. If it says nothing to updade, please check your composer.json to make sure you are not forcing the breaking version there, you should be fine with: backpack/crud: ^5.0 as we don’t push breaking changes in minor versions. (bugs sometimes, but not breaking changes hehe 😀 )

    Cheers

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search