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
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.The command
composer require nwidart/laravel-modules:9.0
installs the latest version of nwidart/laravel-modules package for Laravel 9.0I 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:)