some progress

This commit is contained in:
2025-08-07 23:01:58 +03:00
parent e8d7e6a1c4
commit e351803db2
14 changed files with 971 additions and 226 deletions
+6
View File
@@ -22,6 +22,12 @@ class Comment extends Model
'tmdb_url',
];
protected $dates = [
'published_at',
'created_at',
'updated_at'
];
public function author()
{
return $this->hasOne(User::class, 'id', 'user_id');
+2 -1
View File
@@ -72,7 +72,8 @@ class Movie extends Model
public function director()
{
return $this->belongsToMany(Person::class, 'movie_cast', 'movie_id', 'person_id')
->where('movie_cast.known_for_department', 'Directing')
->where('movie_cast.job', 'Director')
->orWhere('movie_cast.known_for_department', 'Directing')
;
}