composer require php 7.X laravel error - SOLVED
You may encounter this error when you deploy your laravel project. This is because your development php server is lower or greater than the production server php version.
They are two 2 things to do:
. Either you can change the server php version to meet your project requirements or
. Change your projects configuration to meet the server configurations.
The first option is straight forward and it is very easy if you can change the server's php version. But for the second option you need to do the following:
Step: 1: Go to your development project forder
Step 2: Open composer.json file and add the following lines:
"config": {
"platform": {
"php": "7.1.3"
}
}
Step 3: Open your terminal and enter your project root folder
Step 4: Run the following Command to update your configurations:
> composer update