Laravel, wie man die Beziehung zwischen hingehören
$movies = Movie::whereHas('director', function($q) {
$q->where('name', 'great');
})->get();
Fragile Flatworm
$movies = Movie::whereHas('director', function($q) {
$q->where('name', 'great');
})->get();
use App\Models\User;
$user = User::find(1);
$user->roles()->attach($roleId);