I'm learning the composer for a first time with downloading geo-package 'menarasolutions/geographer'. I used to follow package docks but recieve an error:
Fatal error: Uncaught Error: Class "MenaraSolutions\Geographer\Earth" not found in
PATH/fresh-air-2/index.php:7 Stack trace: #0 {main} thrown in
PATH/fresh-air-2/index.php on line 7
composer.json
{
"require": {
"menarasolutions/geographer": "^0.3.13"
}
}
And that's it my code:
<?php
use MenaraSolutions\Geographer\Earth;
use MenaraSolutions\Geographer\Country;
// Default entry point is our beautiful planet
$earth = new Earth();
// Give me a list of all countries please
print_r($earth->getCountries()->toArray());
Also there is my project files tree:
I tried to require_once '/vendor/autoload.php';
but I think server doesn't see this folder in project.
Error looks like
Warning: require_once(/vendor/autoload.php): Failed to open stream: No such file or directory in PATH/fresh-air-2/index.php on line 3