skip to Main Content

after I’ve tried to update all the dependencies of our laravel installation (which started from 5.8) all the way to laravel 9 I’m recently having issues when doing the composer update with the nwidart/laravel-modules.

The error I’m getting is the following:

Class "IlluminateFoundationConsoleShowModelCommand" not found

  at vendor/nwidart/laravel-modules/src/Commands/ModelShowCommand.php:7
      3▕ namespace NwidartModulesCommands;
      4▕ 
      5▕ use IlluminateFoundationConsoleShowModelCommand;
      6▕ 
  ➜   7▕ class ModelShowCommand extends ShowModelCommand
      8▕ {
      9▕ 
     10▕ 
     11▕     /**

      +2 vendor frames 
  3   [internal]:0
      ComposerAutoloadClassLoader::loadClass("NwidartModulesCommandsModelShowCommand")

      +7 vendor frames 
  11  artisan:37
      IlluminateFoundationConsoleKernel::handle(Object(SymfonyComponentConsoleInputArgvInput), Object(SymfonyComponentConsoleOutputConsoleOutput))

does anyone know how to solve it ?

tried using other versions of the same module but nothing..

3

Answers


  1. I have facing same issue. Look like ShowModelCommand only exists with Laravel 10.
    https://laravel.com/api/10.x/Illuminate/Database/Console/ShowModelCommand.html
    and Modules version 10 install automatically with composer require nwidart/laravel-modules

    Try w/ composer require nwidart/laravel-modules "9.*" and it will work.

    Laravel laravel-modules
    5.4 ^1.0
    5.5 ^2.0
    5.6 ^3.0
    5.7 ^4.0
    5.8 ^5.0
    6.0 ^6.0
    7.0 ^7.0
    8.0 ^8.0
    9.0 ^9.0
    10.0    ^10.0
    
    Login or Signup to reply.
  2. The command composer require nwidart/laravel-modules:9.0 installs the latest version of nwidart/laravel-modules package for Laravel 9.0

    Login or Signup to reply.
  3. I have the same problem and this is for laravel updated to version 10 and nwidart/laravel-modules doesn’t compatible with that so easily you can run composer require nwidart/laravel-modules:9.0 to solve temporary your problem:)

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