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:

  1. 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: ...

Get Laravel 5.x Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.