Skip to content

Commit

Permalink
Merge pull request #6 from martinpetrasch/sortindex
Browse files Browse the repository at this point in the history
adding sorting to gallery images
  • Loading branch information
nadar authored Aug 22, 2019
2 parents 5c299de + 30a8608 commit 8aca157
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

All notable changes to this project will be documented in this file. This project make usage of the [Yii Versioning Strategy](https://github.com/yiisoft/yii2/blob/master/docs/internals/versions.md). In order to read more about upgrading and BC breaks have a look at the [UPGRADE Document](UPGRADE.md).

## 1.0.1 (4. September 2018)
## 1.0.1 (22. August 2019)

+ Added view files for default output
+ Fixed readme
+ Added sorting to gallery images

## 1.0.0 (12. December 2018)

Expand Down
2 changes: 1 addition & 1 deletion src/models/Album.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ public function getCat()
*/
public function getAlbumImages()
{
return $this->hasMany(AlbumImage::class, ['album_id' => 'id']);
return $this->hasMany(AlbumImage::class, ['album_id' => 'id'])->orderBy(['sortindex' => SORT_ASC]);
}

/**
Expand Down

0 comments on commit 8aca157

Please sign in to comment.