• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error in the CodeIgniter 4 Tutorial

#2
Also in Accessing Config Files:
Code:
// Creating new class by hand
$config = new \Config\Pager();

// Creating new class with config function
$config = config( 'Pager', false );

// Get shared instance with config function
$config = config( 'Pager' );

// Access config class with namespace
$config = config( 'Config\\Pager' );

// Access settings as class properties
$pageSize = $pager->perPage;

Should be more like:
Code:
// Creating new class by hand
$pager= new \Config\Pager();

// Creating new class with config function
$pager= config( 'Pager', false );

// Get shared instance with config function
$pager= config( 'Pager' );

// Access config class with namespace
$pager= config( 'Config\\Pager' );

// Access settings as class properties
$pageSize = $pager->perPage;
Reply


Messages In This Thread
Error in the CodeIgniter 4 Tutorial - by InsiteFX - 03-13-2019, 08:52 AM
RE: Error in the CodeIgniter 4 Tutorial - by devops - 03-13-2019, 12:23 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.