TIP 28 / 100

Find Many.

Eloquent method find() may accept multiple parameters, and then it returns a Collection of all records found, not just one Model:

php
// Returns a single Eloquent model.
$user = User::find(1);
// Returns an Eloquent collection.
$users = User::find([1,2,3]);
php
return Product::whereIn('id', $this->productIDs)->get();
// Recommended approach:
return Product::find($this->productIDs)

Incase of integer, use whereIn with limited data range only instead use whereIntegerInRaw which is faster then whereIn.

php
Product::whereIn('id', range(1, 50))->get();
// Recommended approach:
Product::whereIntegerInRaw('id', range(1, 50))->get();