Advertisement
jonniehenrique

Untitled

Jan 2nd, 2016
266
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. Fatal error: Class 'App\Models\Site\NoticiaModel' not found in C:\xampp\htdocs\ManagerContent\App\Controllers\Site\HomeController.php on line 13
  2.  
  3. ------------------------------- MODEL ---------------------------------------
  4.  
  5. <?php
  6.  
  7. namespace App\Models\Site;
  8.  
  9. class NoticiaModel extends \ActiveRecord\Model {
  10.  
  11. static $Table = 'noticia';
  12. }
  13.  
  14. ------------------------------- CONTROLLER ---------------------------------------
  15.  
  16. <?php
  17.  
  18. namespace App\Controllers\Site;
  19.  
  20. use \App\Controllers\BaseController as Base;
  21. use \App\Models\Site\NoticiaModel as Noticias;
  22.  
  23. class HomeController extends Base {
  24.  
  25. public function index() {
  26.  
  27. // List Noticias
  28. $Noticias = Noticias::all();
  29. dump($Noticias);
  30.  
  31. $Dados = ['titulo' => 'Home'];
  32. $Template = $this->Twig->loadTemplate('Home.html');
  33.  
  34. $Template->display($Dados);
  35. }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement