[#1] added images processing

This commit is contained in:
2024-12-30 02:42:07 +02:00
parent 51a6ab6c7a
commit a735462fae
5 changed files with 131 additions and 1 deletions
+19
View File
@@ -0,0 +1,19 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Image extends Model
{
protected $fillable = [
'aspect_ratio',
'height',
'iso',
'file_path',
'vote_average',
'vote_count',
'width',
'type',
];
}
+5
View File
@@ -47,4 +47,9 @@ class Movie extends Model
{
return $this->belongsToMany(Person::class, 'movie_crew', 'movie_id', 'person_id');
}
public function images()
{
return $this->belongsToMany(Image::class, 'movie_images', 'movie_id', 'image_id');
}
}