laravel-bakery icon indicating copy to clipboard operation
laravel-bakery copied to clipboard

Throw exception when no arguments are passed to the single entity query

Open robertvansteen opened this issue 6 years ago • 0 comments

Right now we just loop through the arguments, filtering the query. But if you don't supply any arguments and the query returns only model (because there is only one in the database for example) it does not throw any error and return that model. We should check for the amount of argument supplied and throw an exception if that amount is zero.

robertvansteen avatar Jul 05 '18 14:07 robertvansteen