We already saw how easy it is to install the composer package via one of the following two options:
- Executing a command such as require vendor/package:2.* vendor/package2:dev-masterÂ
- Adding a package link information under composer.json require, and executing composer install on console
Without knowing which package exactly we might need, we could use the https://packagist.org search tool to find it. Let's consider, for example, we are looking for a package with an e-mail sending functionality. This is where the sheer size of the Packagist repository might take us some time to find the right package. Luckily, we can use Sort by downloads or Sort by favorites to help ourselves out:
Once we click on the individual package, we get to see the available versions we can install:
Running composer require swiftmailer...