Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Example of Reduce Complexity
// I'm pretty sure that We don't need to know the implementations to guess the return values
$person = App\Person::where('name', 'Duc')->first();
// Return value will be the first person by the name Duc
$count = App\Flight::where('active', 1)->count();
// Return value will be the number of active flight
$max = App\Flight::where('active', 1)->max('price');
// Return value will be the number of the max flight price
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.