Home > Mobile >  How to install laravel 7 with php version 8
How to install laravel 7 with php version 8

Time:09-22

I am geeting error when trying to install laravel 7 using php version 8. Is there any way i can solve this issue.

enter image description here

CodePudding user response:

This message is telling you that no version of Laravel is available for the given version constraint (^7.0) and your PHP version.

Said otherwise every Laravel version from the 7.0 to the latest 7.x (^7.0) isn't compatible with your PHP version (it is probably too old).

You could also have missing extensions that are required by Laravel.

Three options here:

  • You try to fix those versions problems and try again.
  • You bypass Composer checks by using the --ignore-platform-reqs flag: composer create-project --ignore-platform-reqs laravel/laravel:^7.0 blog. Composer will ignore the "platform requirements" and will install Laravel, however it might not work well.
  • You remove the version constraint and Composer will install the latest compatible Laravel version (if there is one, it depends on your extensions): composer create-project laravel/laravel blog.

You can check the PHP version by doing php --version, Laravel 7 requires at least PHP 7.2.

CodePudding user response:

try this, composer create-project laravel/laravel blog ^7.*

  • Related