Composer is an amazing tool in PHP which allows us to pull in libraries from https://packagist.org/ and even our own private repositories. We will cover how to install a library and note some steps to save time.
We covered installing Composer on your Mac in Chapter 1, Setting Up and Installing Laravel, though you can use it inside Homestead if you need to.
Perform the following steps to install Guzzle using Composer:
In this example, we will use Composer to install Guzzle (a powerful PHP HTTP client). Make sure you are in your
App
directory, and in this example, I will be on my local computer and not in Homestead just to make the file processing go faster:>composer require "guzzlehttp/guzzle":"^6.1"
This will take a minute or less to run.
And that is it!