public function databaseCompile($data, $table)
    {
        $rule = 'unique';
        $passed = call_user_func_array([new databaseRules(), $rule], [$data['field'], $data['value'], $table]);
        if ($passed !== true) {
            Handler::set(
                    str_replace(':field', $data['field'], $this->messages[$rule]), $data['field']);
        }
    }
public function databaseCompile($data, $table)
    {
        $rule = 'unique';
        $passed = call_user_func_array([new databaseRules(), $rule], [$data['field'], $data['value'], $table]);
        if ($passed !== true) {
            Handler::set(
                    str_replace(':field', $data['field'], $this->messages[$rule]), $data['field']);
        }
    }
public function databaseCompile ( $ data , $ table ) { $ rule = 'unique' ; $ passed = call_user_func_array ( [ new databaseRules ( ) , $ rule ] , [ $ data [ 'field' ] , $ data [ 'value' ] , $ table ] ) ; if ( $ passed !== true ) { Handler :: set ( str_replace ( ':field' , $ data [ 'field' ] , $ this -> messages [ $ rule ] ) , $ data [ 'field' ] ) ; } }
Compile Database Unique.

@param $data (array)
['policies'] => policies
['value']  => Value to be checked
['field'] => field name

@return string
Compile Database Unique .