find many from belongs to many in laravel code example
Example: laravel how to query belongsTo relationship
$movies = Movie::whereHas('director', function($q) {
$q->where('name', 'great');
})->get();
$movies = Movie::whereHas('director', function($q) {
$q->where('name', 'great');
})->get();