some progress
This commit is contained in:
@@ -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');
|
||||
|
||||
@@ -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')
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user