1. Home
  2. Laravel
  3. Find or fail

Find or fail method provides support for requests that fail to return any data from the data base. Rather than letting the app crash it captures the error and displays an in-built, user-friendly message.

#laravel
findOrFail();

// Use case
Item::findOrFail($item);
copy
Full Laravel cheatsheet
NordVPN NordVPN