Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Class 'Phalcon\\Mvc\\Url' not found in ...

Hi,

I just deployed a phalcon app with apache and php7.3 on centos 7.

I am having this error 'Class 'Phalcon\Mvc\Url' not found in ...'

here is my code sample

`use Phalcon\Mvc\View\Simple as View; use Phalcon\Mvc\Url as UrlResolver; use Phalcon\Db\Adapter\Pdo\Mysql as MysqlPdo; use Phalcon\Queue\Beanstalk;

/**

  • Shared configuration service */ $di->setShared('config', function () { return include APP_PATH . "/config/config.php"; });

/**

  • Sets the view component */ $di->setShared('view', function () { $config = $this->getConfig();

    $view = new View(); $view->setViewsDir($config->application->viewsDir); return $view; });

/**

  • The URL component is used to generate all kind of urls in the application */ $di->setShared('url', function () { $config = $this->getConfig();

    $url = new UrlResolver(); $url->setBaseUri($config->application->baseUri); return $url; }); ` The app is a micro. Please help



793
Accepted
answer
edited 19d ago