firstOrFail method

Future<T> firstOrFail()

The first model; throws ModelNotFoundException (a 404) without one.

Implementation

Future<T> firstOrFail() async =>
    (await first()) ?? (throw ModelNotFoundException(definition.morphClass));