When it i first time installed laravel using
composer global require laravel/installer
it shows the version of 2.1.0 not the latest version?
How to fix this problem? i know i can install specific laravel version with
`composer create-project laravel/laravel="6.0.*" appName`
It's annoying cause in the terminal it still shows the version of 2.1.0
The latest version of Laravel installer as of the moment is 2.1.0. Just take note that it is not same with the Laravel framework that will be installed. They're two separate entities.
hat it is not same with the Laravel framework
laravel -V
it gives you laravel installer version
php artisan --version
You get laravel framework version.For you then show it laravel framework 6.
Related
Is there a way to install Breeze (via composer) into a new Laravel v7 project?
Whenever I try composer require laravel/breeze --dev
I get failure with message:
Cannot use laravel/breeze's latest version v1.17.0 as it requires php ^8.0.2 which is not satisfied by your platform.
./composer.json has been updated
Running composer update laravel/breeze
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
I don't want to use v9 of laravel or php8 due to work on older code.
I created v7 laravel project via composer: composer create-project laravel/laravel:7.* example_app_name
Is there a similar command for previous versions of Breeze? And if so, which version would apply?
No, it should not be possible. Even version 0.0.1 requires Laravel 8.
If you upgrade to Laravel 8 (8.42 minimum version), you should be able to install breeze up to version 1.10
I upload my laravel project on azure. However when I go to the link I got this error. My project php version is 8.0.0 and my azure php version is 7.4.11. How can I can increase the version on my azure php.
If you are deploying your application, you need to update your php version to php version 8
I have the same problem and now it already solve.
Check PHP version commend # php --version
If your PHP 7.4 you need to commend in your laravel project # composer update
If you php >=8.0.0 you need to install php 7.4 and commend in your laravel project # composer update
Simply go to vendor/composer/ , then you will find platform_check.php file. Just open it and comment full code. Save it. That's it. You can now use it with lower php verson.
I can't install Jetstream to my Laravel project. When I use the command composer require laravel / jetstream, it will generate the following error:
[InvalidArgumentException]
The laravel / jetstream package has a PHP requirement incompatible with your PHP version, PHP
extensions and
Composer version
My PHP version is 7.2.24, and my Composer version is 2.0.8.
Laravel Jetstream requires PHP version to be minimum 7.3 so you need to upgrade your PHP version to a minimum of 7.3. It would be better if you upgrade it to PHP 7.4 at least. As PHP 7.3 is now EOL - meaning no active support for PHP 7.3, only security fixes for one more year.
https://www.php.net/supported-versions.php
Laravel Jetstream also requires ext-json to be enabled for PHP. So depending upon your PHP version i.e. 7.3.x or 7.4.x or 8.x you need to install ext-json as well - php7.3-json or php7.4-json or php8.0-json
I was having the exact same problem I just upgraded the version of my PHP 7.3 or above and you should also have laravel version 8 to use jetstream. So for upgrading the PHP version in xampp you can refer to this question.
Upgrading PHP in XAMPP for Windows?
After updating Laravel from 5.1 to 5.2, using composer update command, files composer.json and composer.lock have correct versions (5.2) written under laravel/framework. But the problem is, once I run php artisan --version in CLI it outputs Laravel Framework version 5.1.45 (LTS) and that confuses me.
Is there a way to be sure which version is now installed and being used?
I'm using Laravel 5.0 and homestead 0.4.0 wich is shipped with php 7,
so when I use php artisan tinker I get this error:
error
How can I fix this or should I downgrade my php version and if so wouldn't be any conflict with composer or any other tool in my homestead or laravel?
It seems that one of the libraries your application is using - PhpParser - is not compatible with PHP7. It defines a class called String which is a reserved keyword in version 7.
You need to either downgrade to PHP5 or check if it's possible to upgrade your dependencies so that used PhpParser library is compatible with PHP7. Version 2.x of PhpParser should be compatible.
If you're including the package directly in your composer.json try to upgrade version there.
If not, you can see which of your dependencies requires PhpParser by calling
composer depends nikic/php-parser
See if you are able to upgrade versions of packages it lists.
I solved my problem by installing an older version of homestead v0.3.3 wich is shipped with php 5.6 so here is all you need to download it:
$vagrant box add laravel/homestead --box-version 0.3.3
and then download an older version of Homestead installer from git, I'm using v2.1.8 it works fine: