spatie/laravel-newsletter doesn't work on laravel 5.4 - laravel

Here is the image below
See the image of composer command

Because the latest version is to be used on 5.5.
You can pull an older version if you want:
composer require spatie/laravel-newsletter 3.7.0

Related

Why i cannot install Laravel Breeze

I installed a fresh laravel application using version 7.30.4. When I tried to install laravel breeze, using command composer require laravel/breeze --dev, it gives me this error.
[InvalidArgumentException]
Package laravel/breeze has a PHP requirement incompatible with your PHP version, PHP extensions and Composer version
My current version of PHP is 7.2.19
This error comes due to compatible version in your composer.json file. To fix this issue, change the composer.json file "platform" configuration:
"platform": {
"php": "7.3"
}
Then execute composer install or composer update
or you can run the below command:
composer config platform.php 7.4.3
Laravel breeze required PHP version 7.3 and as you said your PHP version is 7.2.19 so you have to update it.

laravel installing older package version

I'm trying to install this package https://packagist.org/packages/ultraware/roles for laravel 5.3.
simply applying composer require ultraware/roles doesn't work as it is not compatible with laravel 5.3 and i guess I should install an older version of the package. How can i do it. When i try to run
composer require ultraware/roles^1.7.* I get:
Could not find a matching version of package
How can i install version 1.7 of this package?
Not sure why you'd want version 1.7 of this package to be installed, looks like 5.3.1 is a version compatible with Laravel 5.3.
Note:
This package is abandoned and no longer maintained.
If you still want to install a specific version of this package use the following:
composer require ultraware/roles "5.3.1"

How to configure the Composer to always download the latest version?

My composer is downloading version 5.4.36. How to configure the Composer to always download the latest version.
Laravel 5.4 is the latest version with PHP 5.6 support.
Laravel 5.5 requires PHP 7.0, Laravel 5.6 requires PHP 7.1.

laravel homestead - different php version

We are using the latest homestead, where you can fill in the php version in homestead.yml.
I installed php 7.0 with "sudo apt-get install php7.0-fpm".
But from my point of view this php version is not used in my project.
I did a composer update and it takes php 7.1 as basis for the composer.lock.
How to use the php version 7.0 for my composer?
to check what is you cli php version run
php -v
to change it to php 7.0 run
php70

Laravel - Installing packages for older version

I am trying to install a package (https://github.com/ollieread/multiauth), and the site says that i requires Laravel 4.1. I am running Laravel 4.2, and so when I run composer update I get
Your requirements could not be resolved to an installable set of packages.
Why can't I install this on a higher version of Laravel?
You can't install it on higher version of Laravel is because it's been just only support for 4. 1. * of Laravel Version according to their composer.json

Resources