<?php
namespace App\Controllers;
use CodeIgniter\Controller;
use App\Libraries\GroceryCrud;
use App\Models\HalamanModel;
use App\Models\SubhalamanModel;
use App\Models\JurnalModel;
class Koleksi extends Controller
{
public function __construct()
{
session();
ini_set('memory_limit', '-1');
ini_set('max_execution_time', '-1');
$this->ModelHalaman = new HalamanModel();
$this->ModelSubhalaman = new SubhalamanModel();
$this->ModelJurnal = new JurnalModel();
}
public function jurnal_umri()
{
$this->db = \Config\Database::connect('SmartSimpeg', true);
$crud = new GroceryCrud();
$crud->setTable('jurnal');
$output = $crud->render();
$output->title = 'Daftar Jurnal — Pustaka UMRI';
$output->halaman = $this->ModelHalaman->getHalaman()->getResult();
$output->subhalaman = $this->ModelSubhalaman->getSubhalaman()->getResult();
$output->jumlah_jurnal = $this->ModelJurnal->getJumlahJurnal()->countAllResults();
return view('koleksi/jurnal/v_jurnal', (array)$output);
}
}
When I running that code, I receive error :
The table name does not exist. Please check you database and try again.