Answer the question
In order to leave comments, you need to log in
How to call your class in Slim Framework?
$app->get('/', function (Request $request, Response $response, array $args) {
$response->getBody()->write("Main"); // работает
$mod = \Model\MyModel();
$mod->go();
return $response;
});
"autoload": {
"psr-4": {
"Model\\": "model/"
}
}
Fatal error: Call to undefined function model\mymodel() in
Answer the question
In order to leave comments, you need to log in
So you connect a class or a function?
Maybe they just forgot new?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question