Working with Composer install command and avoiding Composer update
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.
Getting ready
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.
How to do it...
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!
How it works...
First, let me say this is a good example of a short tip, which is better than a long one. Maybe other instructions...