Please tell me whats wrong ?
public function view($link = null) {
$temp = $this->BlogModel->getDetail('link', $link);
if (count($temp) == 1) { "this countable"
$data = array(
'app' => $this->app(),
'data' => $temp,
'comments' => $this->BlogCommentModel->getAll(['blog_id' => $temp->id], 'id asc'),
'data_latest' => $this->BlogModel->getLatest(6)
);
$this->BlogModel->updateVisitCount($link);
$this->template->set('title', $data['data']->title . ' | ' . $data['app']->app_name, TRUE);
$this->template->load_view($data['app']->template_frontend.'/detail', $data, TRUE);
$this->template->render();
} else {
redirect(base_url('blog/'));
};
}
Thank you