Installing Laravel With Composer Create-project - How To Use The Newest Version?
It has been a while since I created a new project with Laravel framework. Decided to install a fresh project so opened up V7 documentation at Install Via Composer Create-Project.
First updated my global Composer installation to the newest version:
Then ran installation with composer create-project as exampled in the docs:
composer create-project --prefer-dist laravel/laravel myproject
After installation went into the directory to check Laravel's version:
cd myproject && php laravel -V
Much to my surprise it had installed a much older version:
Laravel Framework 5.8.37
Expected to get the newest version... Why did it install an older version, and how do I upgrade or instruct the create-project command to use the newest version?
It looks lile your environment is insufficient for L7 (like too old PHP version, missing required extensions etc). You should ensure your environment fulfills Laravel requirements:
- PHP >= 7.2.5
- BCMath PHP Extension
- Ctype PHP Extension
- Fileinfo PHP extension
- JSON PHP Extension
- Mbstring PHP Extension
- OpenSSL PHP Extension
- PDO PHP Extension Tokenizer PHP Extension XML PHP Extension
Also keep in mind that php-cli version you use may be different from what your httpd is using (i. e. due to
$PATH and multiple PHP versions are installed).
- → "failed to open stream" error when executing "migrate:make"
- → October CMS Plugin Routes.php not registering
- → OctoberCMS Migrate Table
- → OctoberCMS Rain User plugin not working or redirecting
- → October CMS Custom Mail Layout
- → October CMS - How to correctly route
- → October CMS create a multi select Form field
- → October CMS - Conditionally Load a Different Page
- → How to disable assets combining on development in OctoberCMS
- → October CMS - Radio Button Ajax Click Twice in a Row Causes Content to disappear
- → OctoberCms component: How to display all ID(items) instead of sorting only one ID?
- → In OctoberCMS how do you find the hint path?
- → How to register middlewares in OctoberCMS plugin?