Eager loading cuts down on the number of queries that are executed when dealing with associations. Specifically, it circumvents the N + 1 query problem :php-act...
Note for JavaScript developers: In PHP, an empty array evaluates to false, while in JavaScript an empty array evaluates to true. In PHP, you can test an empty array as ?phpif(!$stu...www.php.net