below is my example routes i have a custom class called Category but am getting error like this Class 'app\\Category' not found
$app->get('/category',function($request, $response, $args){
$categories = new app\Category();
$categories->getCategories();
});
how to load this class in order to make use of it in slim framework V3
通过在 composer.json 中添加 autoload 块,通过 composer autoloader 加载它
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.