Welcome Guest, Not a member yet? Register   Sign In
Model not using DBGroup
#3

As far as I can tell the database connection is working correctly.  For instance in my controller I can use the following code and get data returned.
PHP Code:
public function index() {

    $db = \Config\Database::connect('publications');
    $builder $db->table('FiscalYears');
    $builder->select("*");
    $fy $builder->get()->getResult();

    // Populate the data going to the view
    $data = [
      'fiscalYears' => $fy,
      'title' => 'Fiscal Years',
    ];

    // Generate the view
    echo view('Myth\Auth\Views\layout');
    echo view('FiscalYears/index.php'$data);
  
Reply


Messages In This Thread
Model not using DBGroup - by smcintyr - 07-27-2021, 09:02 AM
RE: Model not using DBGroup - by ikesela - 07-27-2021, 12:24 PM
RE: Model not using DBGroup - by smcintyr - 07-27-2021, 01:04 PM
RE: Model not using DBGroup - by InsiteFX - 07-28-2021, 02:58 AM
RE: Model not using DBGroup - by smcintyr - 07-30-2021, 01:02 PM
RE: Model not using DBGroup - by nfaiz - 07-30-2021, 07:46 PM
RE: Model not using DBGroup - by paulbalandan - 07-30-2021, 08:25 PM
RE: Model not using DBGroup - by InsiteFX - 08-01-2021, 01:33 AM



Theme © iAndrew 2016 - Forum software by © MyBB