src/Torann/RemoteModel/Model.php
public static function findOrFail($id, array $params = [])
    {
        $instance = new static([], static::getParentID());

        // Make request
        if (!is_null($result = $instance->request($instance->getEndpoint(), 'find', [$id, $params]))) {
            return $result;
        }

        // Not found
        throw new NotFoundException;
    }
public static function findOrFail($id, array $params = [])
    {
        $instance = new static([], static::getParentID());

        // Make request
        if (!is_null($result = $instance->request($instance->getEndpoint(), 'find', [$id, $params]))) {
            return $result;
        }

        // Not found
        throw new NotFoundException;
    }
public static function findOrFail ( $ id , array $ params = [ ] ) { $ instance = new static ( [ ] , static :: getParentID ( ) ) ; // Make request if ( ! is_null ( $ result = $ instance -> request ( $ instance -> getEndpoint ( ) , 'find' , [ $ id , $ params ] ) ) ) { return $ result ; } // Not found throw new NotFoundException ; }
Find a model by its primary key or throw an exception

@param  string $id
@param  array  $params
@return mixed|static

@throws \Torann\RemoteModel\NotFoundException
Find a model by its primary key or throw an exception