Added release year to albums
This commit is contained in:
parent
27436feba2
commit
d2ac8ca371
@ -19,4 +19,8 @@ class Album extends Eloquent {
|
|||||||
return $this->hasMany('Fieldprotocol\Music\Song');
|
return $this->hasMany('Fieldprotocol\Music\Song');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function releaseYear() {
|
||||||
|
return date('%Y', strtotime($this->release_date));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -60,7 +60,7 @@
|
|||||||
<div class="thumbnail shadow-1">
|
<div class="thumbnail shadow-1">
|
||||||
<img class="album-art" src="{{ album.album_art }}" alt="{{ album.title }}">
|
<img class="album-art" src="{{ album.album_art }}" alt="{{ album.title }}">
|
||||||
<div class="caption">
|
<div class="caption">
|
||||||
<h5>{{ album.title }}</h5>
|
<h5>{{ album.title }} ({{ album.releaseYear }})</h5>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -60,7 +60,7 @@
|
|||||||
<div class="thumbnail shadow-1">
|
<div class="thumbnail shadow-1">
|
||||||
<img class="album-art" src="{{ album.album_art }}" alt="{{ album.title }}">
|
<img class="album-art" src="{{ album.album_art }}" alt="{{ album.title }}">
|
||||||
<div class="caption">
|
<div class="caption">
|
||||||
<h5>{{ album.title }}</h5>
|
<h5>{{ album.title }} ({{ album.releaseYear }})</h5>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user