some progress

This commit is contained in:
2024-12-30 01:51:28 +02:00
parent 71701e19bf
commit 7436b95f15
53 changed files with 5610 additions and 180 deletions
+22
View File
@@ -0,0 +1,22 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Genre extends Model
{
public const TYPE_MOVIE = 'movie';
public const TYPE_SHOW = 'show';
protected $fillable = [
'name',
'slug',
'tmdb_id',
'type',
];
public function movies() {
return $this->belongsToMany(Movie::class, 'movie_genres', 'genre_id', 'movie_id');
}
}