I needed to create a Laravel project using the laravel cli command and run into this problem: (continue reading to see solution)
$ laravel --version:
Laravel Installer 3.0.1
$ composer global update
Changed current directory to C:/Users/15t/AppData/Roaming/Composer
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- laravel/installer[v3.0.0, ..., v3.0.1] require php ^7.2 -> your php version (8.1.12) does not satisfy that requirement.
- laravel/installer[v3.1.0, ..., v3.2.0] require php ^7.2.9 -> your php version (8.1.12) does not satisfy that requirement.
- Root composer.json requires laravel/installer ^3.0 -> satisfiable by laravel/installer[v3.0.0, v3.0.1, v3.1.0, v3.2.0].
To update/upgrade Laravel Installer just simple run this command:
$ composer global require laravel/installer -W
$ laravel --version
Laravel Installer 4.2.17