How To Install And Use Composer On Ubuntu 18.04 Linux [TUTORIAL] |
|
Explained Easy - everything about everything
If you like music and want to listen more, please visit DreamHeaven channel ▶ https://bit.ly/DreamHeaven How To Install And Use Composer On Ubuntu 18.04 Linux In this tutorial, you will learn how to install Composer and used it in a simple project. You will also know how to install and update dependencies. 0:00:00 - Intro 0:00:31 - Prerequisites 0:00:45 - Step 1 — Installing the Dependencies 0:02:22 - Step 2 — Downloading and Installing Composer 0:07:17 - Step 3 — Using Composer in a PHP Project 0:15:50 - Step 4 — Including the Autoload Script 0:17:50 - Step 5 — Updating Project Dependencies 0:19:24 - Conclusion Commands: sudo apt update sudo apt install curl php-cli php-mbstring git unzip cd ~ curl -sS https://getcomposer.org/installer -o composer-setup.php HASH=e0012edf3e80b6978849f5eff0d4b4e4c79ff1609dd1e613307e16318854d24ae64f26d17af3ef0bf7cfb710ca74755a php -r "if (hash_file('SHA384', 'composer-setup.php') === '$HASH') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer composer cd ~ mkdir slugify cd slugify composer require cocur/slugify ls -l cat composer.json nano test.php (SIGN LESS)?php require __DIR__ . '/vendor/autoload.php'; use Cocur\Slugify\Slugify; $slugify = new Slugify(); echo $slugify-(SIGN MORE)slugify('Hello World, this is a long sentence and I need to make a slug from it!'); php test.php composer update composer update vendor/package vendor2/package2 #ubuntu18 #composer #howtoinstall |