I'm trying to use autoload
of composer
and I can not, it says that the not found
class is trying to load a class from an external library.
I've already run the command line:
composer install
and
composer dump
unsuccessful.
Composer.json
"autoload": {
"psr-4":
{
"App\":
[
"app/",
"tests/"
]
}
}
Code
<?php
namespace App\Database;
use Dotenv\Dotenv;
$dotenv = new Dotenv('../../');
$dotenv->load();
class Database
{...
Error
Fatal error: Uncaught Error: Class 'Dotenv\Dotenv' not found in /home/vagrant/Projetos/qa-toll/src/Database/Database.php on line 7