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

field() public method

Checking that typed field really exist in table
public field ( string $name ) : boolean
$name string
return boolean
    public function field($name)
    {
        if (in_array($name, Config::table($this->name)->fields())) {
            return TRUE;
        }
        throw new LazerException('Field ' . $name . ' does not exists in table "' . $this->name . '"');
    }