How can I add virtual column by using models query object.This one doesn`t work
$user = User::query()
->columns(array(
'',
'(SELECT COUNT() FROM user
) AS UserCnt
'
))
->execute();
How can I add virtual column by using models query object.This one doesn`t work
$user = User::query()
->columns(array(
'',
'(SELECT COUNT() FROM user
) AS UserCnt
'
))
->execute();