Skip to content

Instantly share code, notes, and snippets.

@DarkGhostHunter
Created May 22, 2018 23:52
Show Gist options
  • Save DarkGhostHunter/1d7e1642bf2b11257e427d41dc679857 to your computer and use it in GitHub Desktop.
Save DarkGhostHunter/1d7e1642bf2b11257e427d41dc679857 to your computer and use it in GitHub Desktop.
958dd096db-Subscription
<?php
namespace App\Pivots;
use Illuminate\Database\Eloquent\Relations\Pivot;
class Subscription extends Pivot {
public function user()
{
return $this->belongsTo('App\User');
}
public function podcast()
{
return $this->belongsTo('App\Podcast');
}
public function audioFiles()
{
return $this->hasManyThrough('App\AudioFiles', 'App\Podcast');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment