Welcome Guest, Not a member yet? Register   Sign In
$this->load->vars() in CI4
#2

I believe the point of $this->load->vars() was to make it available to the views. No you can add data directly when you call the view() function.

PHP Code:
$data['user_info'] = $logged_in_employee_info;
$data['controller_name'] = $module_id;

echo 
view('dashboard'$data); 
Reply


Messages In This Thread
$this->load->vars() in CI4 - by objecttothis - 09-30-2021, 05:35 AM
RE: $this->load->vars() in CI4 - by kilishan - 09-30-2021, 06:17 AM
RE: $this->load->vars() in CI4 - by iRedds - 09-30-2021, 09:06 AM
RE: $this->load->vars() in CI4 - by InsiteFX - 10-01-2021, 01:41 AM



Theme © iAndrew 2016 - Forum software by © MyBB