Added release date to selected album info
This commit is contained in:
@ -19,6 +19,10 @@ class Album extends Eloquent {
|
||||
return $this->hasMany('Fieldprotocol\Music\Song');
|
||||
}
|
||||
|
||||
public function releaseDate() {
|
||||
return date('F jS, Y', strtotime($this->release_date));
|
||||
}
|
||||
|
||||
public function releaseYear() {
|
||||
return date('Y', strtotime($this->release_date));
|
||||
}
|
||||
|
@ -23,6 +23,7 @@
|
||||
<img id="album-artwork" class="image-responsive album-art" src="{{ albums[0].album_art }}" alt="{{ albums[0].title }}">
|
||||
<div class="caption">
|
||||
<h3 id="album-title">{{ albums[0].title }}</h3>
|
||||
<h4 id="album-release">{{ albums[0].releaseDate }}</h4>
|
||||
{% if albums[0].description %}
|
||||
<hr />
|
||||
<p id="album-description">{{ albums[0].description }}</p>
|
||||
|
@ -24,6 +24,7 @@
|
||||
<img id="album-artwork" class="image-responsive album-art" src="{{ albums[0].album_art }}" alt="{{ albums[0].title }}">
|
||||
<div class="caption">
|
||||
<h3 id="album-title">{{ albums[0].title }}</h3>
|
||||
<h4 id="album-release">{{ albums[0].releaseDate }}</h4>
|
||||
{% if albums[0].description %}
|
||||
<hr />
|
||||
<p id="album-description">{{ albums[0].description }}</p>
|
||||
|
Reference in New Issue
Block a user