Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding sorting to gallery images #6

Merged
merged 2 commits into from
Aug 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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