Yii2 print ActiveRecord query sql output

<?php
 
echo $query->createCommand()->sql;

Leave a Reply