how I can load controller in my view file
Permalink 1 user found helpful
how I can load controller in my view file?
Thank for your help, now i have another issue.
controller is called but when i use
In controller
$this->set("job","Designer");
In View
echo "job value".$job;
but not found $job value ??
controller is called but when i use
In controller
$this->set("job","Designer");
In View
echo "job value".$job;
but not found $job value ??
Where are you doing the $this->set()?
Something like this should work:
Something like this should work:
public function view() { $this->set('job', 'designer'); }
Yes thanks ,its working for me in
public function view().
but I create my custom function in controller like that.
In Controller
public function testfunction()
{
$this->set('job',"Programmer");
}
this should also work, how we can access from custom function??
public function view().
but I create my custom function in controller like that.
In Controller
public function testfunction()
{
$this->set('job',"Programmer");
}
this should also work, how we can access from custom function??
$this->controller
Maybe it's the same for other views as well.