[#1] watch providers
This commit is contained in:
@@ -62,4 +62,9 @@ class Movie extends Model
|
||||
{
|
||||
return $this->belongsToMany(ReleaseDate::class, 'movie_release_dates', 'movie_id', 'release_date_id');
|
||||
}
|
||||
|
||||
public function watchProviders()
|
||||
{
|
||||
return $this->belongsToMany(WatchProvider::class, 'movie_watch_providers', 'movie_id', 'watch_provider_id');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class WatchProvider extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'type',
|
||||
'logo_path',
|
||||
'tmdb_provider_id',
|
||||
'provider_name',
|
||||
'display_priority',
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user