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.

Model::query Left join getting model not loaded error.

So here is my query.

use Nova\Models\Accounts;
use Nova\Models\AccountStatus;

public function indexAction(){
  $statusCount = AccountStatus::query()
  ->leftJoin('Accounts',' = AccountStatus.accountId','a')
  ->where('a.userId = :id:')
  ->bind(array('id' => 1)) // 1 is test value

Getting this error:

Phalcon\Mvc\Model\Exception: Model 'Accounts' could not be loaded /nova/app/controllers/DashboardController.php (44)


Model names inside strings aren't resolved by PHP: