src/ORM/ArrayList.php
public function canFilterBy($by)
    {
        if (empty($this->items)) {
            return false;
        }

        $firstRecord = $this->first();

        return array_key_exists($by, $firstRecord);
    }
public function canFilterBy($by)
    {
        if (empty($this->items)) {
            return false;
        }

        $firstRecord = $this->first();

        return array_key_exists($by, $firstRecord);
    }
public function canFilterBy ( $ by ) { if ( empty ( $ this -> items ) ) { return false ; } $ firstRecord = $ this -> first ( ) ; return array_key_exists ( $ by , $ firstRecord ) ; }
Returns true if the given column can be used to filter the records.

It works by checking the fields available in the first record of the list.

@param string $by
@return bool
Returns true if the given column can be used to filter the records .