• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do you access the $this bound data of the controller in the view? Ci3 is OK, ci4

#8
(10-15-2017, 07:26 PM)kilishan Wrote: You won't be able to get access to anything in the controller unless it's passed to the view. Any data you want in the view should be passed to it.

hi does it mean i can't pass Value in my Base_controller to view or controller anymore in CI4 ? like this code

Base_controller
Code:
$this->tbl_slide = 'tbl_slide';
$this->tbl_user = 'tbl_user';


/* Session language */
$this->my_lang = $this->session->userdata('camfone_lang_file') ?? 'khmer';
$this->lang->load("{$this->my_lang}_lang", $this->my_lang);
$this->my_prefix = $this->session->userdata('camfone_prefix') ?? '_kh';


so i can't call $this->my_prefix in my view or other Controller anymore in CI4 ? 
Thank in advance.
Reply


Messages In This Thread
RE: How do you access the $this bound data of the controller in the view? Ci3 is OK, ci4 - by tereaksmey123 - 10-20-2017, 07:25 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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