Created
May 22, 2018 23:52
-
-
Save DarkGhostHunter/1d7e1642bf2b11257e427d41dc679857 to your computer and use it in GitHub Desktop.
958dd096db-Subscription
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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