[#1] processing videos and livewire
This commit is contained in:
@@ -67,4 +67,9 @@ class Movie extends Model
|
||||
{
|
||||
return $this->belongsToMany(WatchProvider::class, 'movie_watch_providers', 'movie_id', 'watch_provider_id');
|
||||
}
|
||||
|
||||
public function videos()
|
||||
{
|
||||
return $this->belongsToMany(Video::class, 'movie_videos', 'movie_id', 'video_id');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Video extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'iso_639',
|
||||
'iso_3166',
|
||||
'name',
|
||||
'key',
|
||||
'site',
|
||||
'size',
|
||||
'type',
|
||||
'official',
|
||||
'published_at',
|
||||
'tmdb_id',
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user