[#1] processing videos and livewire

This commit is contained in:
2024-12-30 18:28:50 +02:00
parent c16b36a6da
commit 6abcbe2a84
18 changed files with 280 additions and 39 deletions
+5
View File
@@ -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');
}
}
+21
View File
@@ -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',
];
}