public function firstOrFail() { $item = $this->first(); if ($item === null) { throw new ModelNotFoundException(ucfirst(Str::camelize($this->model->getTable())) . ' was not found'); } return $item; }