I have a directory structure like this:

and this is my composer .json:
{
"autoload": {
"psr-4": {
"travelo_conf\\": "config/",
"travelo_url\\": "url/"
}
}
}
now i am trying to extend my api class with hotel class
this is my ApiConfig class:
namespace travelo_conf\config ;
class ApiConfig {}
and this is my hotel class:
<?php
namespace travelo_url\hotelbedsUrl ;
require '../vendor/autoload.php';
use travelo_conf\config\ApiConfig ;
class Hotels extends ApiConfig
{
function __construct()
{
parent::__construct() ;
}
}
and I got the error:
Fatal error: Class 'travelo_conf \ config \ ApiConfig' not found in / var / www / html / 4travelo_Beta / url / getHotelUrl.php on line 9
can someone explain to me why?
source
share