Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static function all()
- {
- $connection = Yii::app()->db;
- $sql = 'SELECT * FROM `services` ORDER BY name ASC';
- $models = $connection->createCommand($sql)->queryAll();
- $return = [];
- foreach ($models as $id => $name) {
- $return[$id] = $name;
- var_dump($return);
- }
- return $return;
- }
Advertisement
Add Comment
Please, Sign In to add comment