public function findOrFailByUuid($uuid, $columns = ['*'])
    {
        $result = $this->findByUuid($uuid, $columns);

        if (is_array($uuid)) {
            if (count($result) == count(array_unique($uuid))) {
                return $result;
            }
        } elseif (! is_null($result)) {
            return $result;
        }

        throw new NotFoundHttpException('Resource \'' . class_basename(get_class($this->model)) . '\' with given UUID ' . $uuid . ' not found');
    }
public function findOrFailByUuid($uuid, $columns = ['*'])
    {
        $result = $this->findByUuid($uuid, $columns);

        if (is_array($uuid)) {
            if (count($result) == count(array_unique($uuid))) {
                return $result;
            }
        } elseif (! is_null($result)) {
            return $result;
        }

        throw new NotFoundHttpException('Resource \'' . class_basename(get_class($this->model)) . '\' with given UUID ' . $uuid . ' not found');
    }
public function findOrFailByUuid ( $ uuid , $ columns = [ '*' ] ) { $ result = $ this -> findByUuid ( $ uuid , $ columns ) ; if ( is_array ( $ uuid ) ) { if ( count ( $ result ) == count ( array_unique ( $ uuid ) ) ) { return $ result ; } } elseif ( ! is_null ( $ result ) ) { return $ result ; } throw new NotFoundHttpException ( 'Resource \'' . class_basename ( get_class ( $ this -> model ) ) . '\' with given UUID ' . $ uuid . ' not found' ) ; }
Find a model by its UUID key or throw a not found exception.

@param  mixed  $uuid
@param  array  $columns
@return \Illuminate\Database\Eloquent\Model|\Illuminate\Database\Eloquent\Collection

@throws \Illuminate\Database\Eloquent\ModelNotFoundException
Find a model by its UUID key or throw a not found exception .