Hi i created a form following the vokuro sample app.
However i cant make it work
this is my config file
<?php
defined('APP_PATH') || define('APP_PATH', realpath('.'));
return new \Phalcon\Config([
'database' => [
'adapter' => 'Mysql',
'host' => 'localhost',
'username' => 'root',
'password' => '',
'dbname' => 'test',
'charset' => 'utf8',
],
'application' => [
'controllersDir' => APP_PATH . '/app/controllers/',
'modelsDir' => APP_PATH . '/app/models/',
'migrationsDir' => APP_PATH . '/app/migrations/',
'viewsDir' => APP_PATH . '/app/views/',
'pluginsDir' => APP_PATH . '/app/plugins/',
'libraryDir' => APP_PATH . '/app/library/',
'cacheDir' => APP_PATH . '/app/cache/',
'formsDir' => APP_PATH . '/app/forms/',
'baseUri' => '/lanus/',
]
]);
?>
this is my loader
<?php
$loader = new \Phalcon\Loader();
/**
* We're a registering a set of directories taken from the configuration file
*/
$loader->registerDirs(
[
$config->application->controllersDir,
$config->application->modelsDir,
$config->application->formsDir,
]
)->register();
// Register some namespaces
$loader->registerNamespaces(
array(
"Lanus" => APP_PATH . "/"
)
);
// Register autoloader
$loader->register();
?>
this is the error i get PHP Fatal error: Uncaught Error: Class 'Lanus\Forms\PagoExpressForm' not found in /var/www/html/lanus/app/controllers/CheckoutController.php:22
this is my controller
<?php
use Lanus\Forms\PagoExpressForm;
use Phalcon\Auth\Exception as AuthException;
class CheckoutController extends \Phalcon\Mvc\Controller
{
public function indexAction()
{
}
public function pagoexpressAction()
{
$form = new PagoExpressForm();
}
}
?>