Answer the question
In order to leave comments, you need to log in
Why are classes from $container dependencies not visible in Slim Framework?
Good afternoon, please tell me what could be the reason where to look at least.
I use Slim php framework, I add my two classes in the dependency file
$container['excel'] = function () {
$excel = new \PhpOffice\PhpSpreadsheet\Spreadsheet;
return $excel;
};
$container['xls'] = function () {
$xls = new \PhpOffice\PhpSpreadsheet\Writer\Xlsx;
return $xls;
};
$app->get('/test', function (Request $request, Response $response, array $args) {
$this->и тут автокомплит не работает
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question