Larabros\Elogram\Http\Response::isRecord PHP 메소드

isRecord() 보호된 메소드

Tests the current response data to see if a single record was returned.
protected isRecord ( array | Collection $data ) : boolean
$data array | Illuminate\Support\Collection
리턴 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);
    }