Closed roobiniano closed 3 years ago
You need to reference the User model class in its own namespace - so this:
$users = \App\Models\User::getAll();
or add a use
statement at the top to import it into the current namespace:
use App\Models\User;
You need to reference the User model class in its own namespace - so this:
$users = \App\Models\User::getAll();
or add a
use
statement at the top to import it into the current namespace:
use App\Models\User;
🤦♂️, thanks works perfectly, sorry, it was late when i was working the framwork is beatiful !
Fatal error Uncaught exception: 'Exception'
Message: 'Method getAllAction not found in controller App\Controllers\User'
thats my controller :
`<?php
namespace App\Controllers;
use \Core\View;
/**
PHP version 7.0 */ class User extends \Core\Controller {
/**
@return void */ public function indexAction() {
View::renderTemplate('User/users.twig', array('users' => $users)); } }`