Welcome Guest, Not a member yet? Register   Sign In
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



Theme © iAndrew 2016 - Forum software by © MyBB