Hello community
I'm new to Phalcon and I'm trying to do a simple thing which is getting the settings from the databse using the models.
This is my main controller:
<?php
use \settings\Settings;
class UserEndController extends \Phalcon\Mvc\Controller
{
public function homeAction()
{
$settings = Settings::findFirst(1);
}
}
But I encounter this error:
Fatal error: Uncaught Error: Class 'settings\Settings' not found in C:\xampp\htdocs\icriticize\app\controllers\UserEndController.php:11
Stack trace:
#0 [internal function]: UserEndController->homeAction()
#1 [internal function]: Phalcon\Dispatcher->callActionMethod(Object(UserEndController), 'homeAction', Array)
#2 [internal function]: Phalcon\Dispatcher->dispatch()
#3 C:\xampp\htdocs\icriticize\public\index.php(42): Phalcon\Mvc\Application->handle()
#4 C:\xampp\htdocs\icriticize\.htrouter.php(30): require_once('C:\\xampp\\htdocs...')
#5 {main} thrown in C:\xampp\htdocs\icriticize\app\controllers\UserEndController.php on line 11
BTW I run the app using phalcon serve. I'm on windows and using XAMPP with PHP x64