yii2 print model code example Example: yii2 print model header('Content-type: text/plain'); print_r($var); exit;