nWidart / laravel-modules

Module Management In Laravel
https://docs.laravelmodules.com
MIT License
5.5k stars 954 forks source link

Warning when tried to install package in laravel 10 #1915

Closed MoSalemDev closed 1 month ago

MoSalemDev commented 1 month ago

err Hello

I got warning when tried to install package in laravel 10

`PHP Fatal error: Trait "Illuminate\Console\Prohibitable" not found in F:\Projects\lara-project\modules\module-app\vendor\nwidart\laravel-modules\src\Commands\BaseCommand.php on line 17

Symfony\Component\ErrorHandler\Error\FatalError

Trait "Illuminate\Console\Prohibitable" not found

at vendor\nwidart\laravel-modules\src\Commands\BaseCommand.php:17 13▕ use Symfony\Component\Console\Output\OutputInterface; 14▕ 15▕ use function Laravel\Prompts\multiselect; 16▕ ➜ 17▕ abstract class BaseCommand extends Command implements PromptsForMissingInput 18▕ { 19▕ use ConfirmableTrait; 20▕ use Prohibitable; `

MoSalemDev commented 1 month ago

It solved !

For those who face the same problem when working with an old version of laravel such as v.10

You have to specify which version of the laravel modules you want to install that is compatible with the Laravel version

An example of the case here

composer require nwidart/laravel-modules 10

that's all