简体   繁体   中英

Error while installing Laravel 8 using Composer

I am new to Laravel. I installed Composer globally on the "C:" drive and installed XAMP too. But after that, when I try to install Laravel, it gives me the error on CL, and hence the setup breaks.

[InvalidArgumentException] Composer could not find the config file: C:\\xampp\\phpMyAdmin To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section

I searched a lot for this but couldn't find any relevant thing to it.

install composer with this link: https://getcomposer.org/Composer-Setup.exe

and open setup and use recommended settings

then unchecked the developer mode and next on prompt then select this path in your c drive if your xampp install in c drive.

    C:\xampp\php\php.exe

Then next may be you have the checkbox underneath so do check it, then in proxy page left it blank and then next and install then wait and next and finish.

Then go to cmd and type in root user:

    composer

If you see this scree then composer is installed succesfully :

 / ____/___  ____ ___  ____  ____  ________  _____
 / /   / __ \/ __ `__ \/ __ \/ __ \/ ___/ _ \/ ___/
/ /___/ /_/ / / / / / / /_/ / /_/ (__  )  __/ /
\____/\____/_/ /_/ /_/ .___/\____/____/\___/_/
                    /_/
Composer version 2.1.3 2021-06-09 16:31:20

Now go to htdocs in xampp then go to search bar and type cmd in it and cmd open in the selected folder of xampp.

Then type:

composer create-project --prefer-dist laravel/laravel YOUR NAME

If you see this line:

Application key set successfully.

Then Your project is created.

Enjoy Developing!!!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM