feat: initial laravel install, models, seeders

This commit is contained in:
2023-06-21 08:53:21 -05:00
parent 86d989b51c
commit 1c81ca91d1
178 changed files with 20002 additions and 1 deletions

View File

@@ -0,0 +1,32 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class Episode extends Model
{
use HasFactory;
use SoftDeletes;
protected $dates = ['episode_date', 'created_at', 'updated_at', 'deleted_at'];
public function podcast()
{
return $this->belongsTo(Podcast::class);
}
public function artwork()
{
return $this->hasOne(Artwork::class);
}
public function artist()
{
return $this->hasOneThrough(Artist::class, Artwork::class);
}
}