The findOrFail method also accepts a list of ids. If any of these ids are not found, then it "fails".
Nice if you need to retrieve a specific set of models and don't want to have to check that the count you got was the count you expected
1User::create(['id' => 1]); 2User::create(['id' => 2); 3User::create(['id' => 3]); 4 5// Retrives the user... 6$user = User::findOrFail(1); 7 8// Throws a 404 because the user doesn't exist... 9User::findOrFail(99);10 11// Retrives all 3 users...12$users = User::findOrFail([1, 2, 3]);13 14// Throws because it is unable to find *all* of the users15User::findOrFail([1, 2, 3, 99]);
Tip given by @timacdonald87