https://youtu.be/qQrOJ_xPps4?rel=0
Steps to install dependency using Composer
- Create a project from a PHP template.
- Open a terminal and type
composer init
to init your Composer project.
- Install dependency using the proposed search menu or install it later using the command:
composer require ehime/hello-world
- Update your code to use autoloader:
<?php
require 'vendor/autoload.php';
use HelloWorld\\SayHello;
echo SayHello::world() . "\\n";
- Tap the Run button and check out the result!