How to send model to layout file from controller in YII2 -


i not able send model parameters on layout file via controller action. how that?

add proprety controller

public $model; 

in controller action

$this->model = $model 

from layout can access model by

$this->context->model 

Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -