This pull request makes two changes to the find methods in Simple Commerce's repositories:
When using find, if an entry/model can't be found, null will be returned instead of an exception.
Added a new findOrFail method, which does the same as find, however instead of returning null when an entry/model can't be found, it'll return an exception.
This brings things inline with Laravel and soon Statamic Core.
This pull request makes two changes to the
find
methods in Simple Commerce's repositories:find
, if an entry/model can't be found,null
will be returned instead of an exception.findOrFail
method, which does the same asfind
, however instead of returningnull
when an entry/model can't be found, it'll return an exception.This brings things inline with Laravel and soon Statamic Core.
Fixes #988.