feat/factory_creation (#1)
Prepping for launch. Reviewed-on: #1 Co-authored-by: Paul Couture <paul@paulcouture.com> Co-committed-by: Paul Couture <paul@paulcouture.com>
This commit was merged in pull request #1.
This commit is contained in:
@@ -14,6 +14,13 @@ class Episode extends Model
|
||||
|
||||
protected $dates = ['episode_date', 'created_at', 'updated_at', 'deleted_at'];
|
||||
|
||||
protected $casts = [
|
||||
'episode_date' => 'date',
|
||||
'created_at' => 'datetime',
|
||||
'updated_at' => 'datetime',
|
||||
'deleted_at' => 'datetime',
|
||||
];
|
||||
|
||||
public function podcast()
|
||||
{
|
||||
return $this->belongsTo(Podcast::class);
|
||||
@@ -21,7 +28,12 @@ class Episode extends Model
|
||||
|
||||
public function artwork()
|
||||
{
|
||||
return $this->hasOne(Artwork::class);
|
||||
return $this->hasOne(Artwork::class, 'id', 'artwork_id');
|
||||
}
|
||||
|
||||
public function artworks()
|
||||
{
|
||||
return $this->hasMany(Artwork::class);
|
||||
}
|
||||
|
||||
public function artist()
|
||||
|
||||
Reference in New Issue
Block a user