The model only gives NOT FOUND in a controller that manages News.
ERROR: Fatal error: Class 'App \ Models \ Site \ NewsModel' not found in C: \ xampp \ htdocs \ ManagerContent \ App \ Controllers \ Site \ HomeController.php on line 13
Follow the link in pastebin to understand the problem: link
Model:
<?php
namespace App\Models\Site;
class NoticiaModel extends \ActiveRecord\Model {
static $Table = 'noticia';
}
Controller:
<?php
namespace App\Controllers\Site;
use \App\Controllers\BaseController as Base;
use \App\Models\Site\NoticiaModel as Noticias;
class HomeController extends Base {
public function index() {
// List Noticias
$Noticias = Noticias::all();
dump($Noticias);
$Dados = ['titulo' => 'Home'];
$Template = $this->Twig->loadTemplate('Home.html');
$Template->display($Dados);
}
}