Reputation: 147
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
Upvotes: 1
Views: 643
Reputation: 147
Got it loaded through composer autoloader by adding autoload block in composer.json
Upvotes: 1