Home > front end >  Problem in creating first laravel project. Below are php ,laravel installer and composer version det
Problem in creating first laravel project. Below are php ,laravel installer and composer version det

Time:10-13

C:\xampp\htdocs>php -v PHP 8.1.11 (cli) C:\xampp\htdocs>composer -v Composer version 2.4.2 2022-09-14 16:11:15

C:\xampp\htdocs>laravel -v Laravel Installer 4.2.17

C:\xampp\htdocs>laravel new example-app3

Problem 1 - laravel/framework[v9.19.0, ..., 9.x-dev] require league/flysystem ^3.0.16 -> satisfiable by league/flysystem[3.0.16, ..., 3.x-dev]. - league/flysystem[3.0.16, ..., 3.x-dev] require league/mime-type-detection ^1.0.0 -> satisfiable by league/mime-type-detection[1.0.0, ..., 1.11.0]. - league/mime-type-detection[1.0.0, ..., 1.3.0] require php ^7.2 -> your php version (8.1.11) does not satisfy that requirement. - league/mime-type-detection[1.4.0, ..., 1.11.0] require ext-fileinfo * -> it is missing from your system. Install or enable PHP's fileinfo extension. - Root composer.json requires laravel/framework ^9.19 -> satisfiable by laravel/framework[v9.19.0, ..., 9.x-dev].

To enable extensions, verify that they are enabled in your .ini files: - C:\Program Files\php 8\php.ini You can also run php --ini in a terminal to see which files are used by PHP in CLI mode. Alternatively, you can run Composer with --ignore-platform-req=ext-fileinfo to temporarily ignore these required extensions.

CodePudding user response:

I had the same problem and did it like this. B1: composer update --ignore-platform-req=ext-fileinfo (terminal). B2: php artisan serve (terminal). B3: generate app key -> refresh now.

CodePudding user response:

Make sure to setup Environment variables in windows. Check this tutorials for instructions

Then try this:

composer global require laravel/installer
laravel new app-name

or this:

composer create-project laravel/laravel app-name
  • Related