How to return an item in Eloquent, or throw a ModelNotFoundException exception if it isn't found?
firstOrFail(). This is similar to
findOrFail() does a 'WHERE id = ?' (assuming id is the primary key). With
firstOrFail() it will return the first row based on whatever WHERE statements you have.
<?php $user = User::where("email","email@example.com"->firstOrFail()
If you don't
first() (which will return null if nothing is found.