Hi there. I have a pretty shitty error and I can't get a query working.
I have this simple lines:
$trivia = KptTrivias::findFirst('id_kpt_events="10"');
if ($trivia) {
$this->view->trivia = $trivia;
} else {
$this->view->trivia = 'NO_DATA_FOUND';
}
and then in the volt file I have:
<?php echo json_encode($trivia, JSON_PRETTY_PRINT); ?>
And well, nothing comes out. My database has just one registry:
How is that even possible?