Eloquent Puzzles 01: Add the Missing Code

Answer these 1 questions. There's no time limit.

Question #1 Look at the code snippet. When launched, it will throw an error, because it's missing one important thing.
Please write the correct full code.
Code snippet
$role_id = 1;
$users = User::with('roles')->whereHas('roles', function($query) {
    $query->where('id', $role_id);
})->get();
Please fill in your answer