When i open a link localhost/web/newpanel/auth/login the below error shown please tell me what's wrong in my code please check below error and my files.
Fatal error: Call to a member function execute() on null in F:\Ampps\www\web\newpanel\Application\Libs\PDODb.php on line 972
<?php
namespace Application\Models;
use \Application\Core\Model as MainModel;
class AuthModel extends MainModel
{
public function __construct(){
$this->table = "users";
}
}
/** Application/Controllers/Auth.php file end ***/
/** Application/Core/Modal.php file start ***/
<?php
namespace Application\Core;
use \Application\Libs\PDODb;
class Model
{
private static function getDB()
{
$db = new PDODb('mysql','localhost', 'root', 'mysql', 'newpanel');
return $db;
}
public function selectAll()
{
$db = static::getDb();
$result = $db->get("activitylog");
return $result;
}
}
When i open a link localhost/web/newpanel/auth/login the below error shown please tell me what's wrong in my code please check below error and my files.
Fatal error: Call to a member function execute() on null in F:\Ampps\www\web\newpanel\Application\Libs\PDODb.php on line 972
Directory Structure Application -Controllers --Auth.php -Core --Modal.php -Libs --PDODb.php -Modals --AuthModal.php
My Application use SplAutoload function for autoload classes
/** Application/Controllers/Auth.php file start ***/
/** Application/Controllers/Auth.php file end ***/
/** Application/Modals/AuthModal.php file start ***/
/** Application/Controllers/Auth.php file end ***/
/** Application/Core/Modal.php file start ***/
/** Application/Core/Modal.php file end ***/