i have partial view called head , render partial before index view , got client information model , want pass client model head partial can not. code :
class indexcontroller extends controllerbase { public function initialize() {     $this->tag->settitle($this->lang('index')->_('title'));     $this->view->settemplateafter('header');     $this->view->settemplatebefore('footer'); }  public function indexaction() {     $this->view->t = $this->lang('index');     $this->view->client = $this->getclient(); } this base controller
class controllerbase extends controller { public function getclient() {     $auth = $this->session->get('auth');     return client::findfirst([         "client_id = :client_id:",         'bind' => [             'client_number' => $auth['client_id']         ]     ]); } how can pass client model head partial?
 
 
  
Comments
Post a Comment