Lazer\Classes\Helpers\Validate::fields PHP Method

fields() public method

Checking that typed fields really exist in table
public fields ( array $fields ) : boolean
$fields array Indexed array
return boolean
    public function fields(array $fields)
    {
        $fields = self::filter($fields);
        $diff = array_diff($fields, Config::table($this->name)->fields());
        if (empty($diff)) {
            return TRUE;
        }
        throw new LazerException('Field(s) "' . implode(', ', $diff) . '" does not exists in table "' . $this->name . '"');
    }