Files

21 lines
387 B
PHP
Raw Permalink Normal View History

2024-12-30 01:51:28 +02:00
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class MovieCollection extends Model
{
protected $fillable = [
'name',
'slug',
'poster_path',
'backdrop_path',
'tmdb_id',
];
public function movies() {
return $this->belongsToMany(Movie::class, 'movies_in_collection', 'collection_id', 'movie_id');
}
}