Using Composer Command
I Have Some Problems. C: /Apps>Composer Require Musonza/Chat Using Version ^3.7 for Musonza/Chat Root Package 'Musonza/Chat' Cannot Require Itself in Its...
I have some problems.
C:/apps>composer require musonza/chat
Using version ^3.7 for musonza/chat
Root package 'musonza/chat' cannot require itself in its composer.json
I can't find the solution from anywhere. Do you know the solution?
2 Answers
I think you are trying to require musonza/chat in the clone of that package or your project name has the same name as the package that you want to install/require.
You should install musonza/chat on the laravel project because it's a package for laravel.
Try step below to create a laravel project :
composer create-project --prefer-dist laravel/laravel chat
go to chat folder then install the package:
composer require musonza/chat
then publish the assets of that package:
php artisan vendor:publish
See musonza_chat.php for configuration
then run the migrations:
php artisan migrate
Note: The requirement of laravel 6 is PHP 7.2 or above, so please install it
If you clone from git or downloaded run composer install instead of composer require musonza/chat