Yii - repeat last request

I used Codeigniter before, and it has a function that will echo the last database query - really useful for debugging.

eg,...

$this->getSomeData->findAll();
Yii command to output this single query e.g SELECT * FROM TABLE...

Does Yii have a similar function to just show the last request completed?

+4
source share
1 answer

Try in the configuration file. You can see the request and other data at the bottom of the page.

'db'=>array(
        'enableProfiling'=>true,
        'enableParamLogging' => true,
),
'log'=>array(
    'class'=>'CLogRouter',
    'routes'=>array(
        array(
            'class'=>'CProfileLogRoute',
            'levels'=>'profile',
            'enabled'=>true,
        ),
    ),
),
+10
source

All Articles