<?php
namespace console\controllers;
class ImportController extends \yii\console\Controller
{
public function actionHeatMeter()
{
$this->layout = 'blank';
return $this->render('heatmeter');
}
public function actionIndex()
{
echo "in the import controller!";
//return $this->render('index');
}
}
I’m trying to call it with
php yii import
No errors, not echoing ‘in the import controller!’, nothing.
Have I written something backwards? I feel like I am going a bit mad.
I had a ‘return’ in my helpers/console.php instead of the expected function. For some reason, my local environment wasn’t spitting out any error - when I tested it on the staging server it did.