Yii2 Active Record - get records with distict names

yii2
voted: 0
vote
php yii2 activerecord select distinct

Get distinct records with for example name from workers table:

<?php
$names = Worker::find()
                    ->select('name')
                    ->distinct()->all();
?>
working url: not entered
version: 2
Leave a Comment:
Characters left:
No comments yet.