'datetime', 'updated_at' => 'datetime', 'deleted_at' => 'datetime', ]; protected $fillable = [ 'user_id', 'name', 'slug', 'avatar', 'header', 'location', 'website', 'bio', 'created_at', 'updated_at', 'deleted_at', ]; public function user() { return $this->belongsTo(User::class); } public function artworks() { return $this->hasMany(Artwork::class); } public function overlays() { return $this->hasMany(Overlay::class); } public function episodes() { return $this->hasManyThrough(Episode::class, Artwork::class); } public function wallets() { return $this->hasMany(Wallet::class); } public function avatar() { if (!$this->avatar) { return asset('resources/img/default_avatars/default_avatar_male.svg'); } return config('app.static_asset_url') . '/' . $this->avatar; } }