Larabros\Elogram\Http\Response::isRecord PHP Method

isRecord() protected method

Tests the current response data to see if a single record was returned.
protected isRecord ( array | Collection $data ) : boolean
$data array | Illuminate\Support\Collection
return boolean
    protected function isRecord($data)
    {
        if ($data instanceof Collection) {
            return false;
        }
        $keys = array_keys($data);
        return in_array('id', $keys, true) || in_array('name', $keys, true);
    }