I am working on a micro application and want to use namespace BII for my api
- so i have "namespace BII;" added to almost all my code files
- registered by controllers directory in config.php -> 'controllersDir' => APP_PATH . '/controllers/',
- loader.php also registers my directory as $config->application->controllersDir
But still i am not able to initialize my controller class - i get this error
Fatal error: Class 'BII\ProjectsController' not found in C:\Users\user\Sites\bii\app.php on line 10 This is how my Projectscontroller code looks
namespace BII; use \Phalcon\Mvc\Controller;
class ProjectsController extends Controller {
public function indexAction() { $message = array('message' => 'Hello, listing all projects'); echo json_encode($message); }
}
what am i doing wrong?