public function form(array $options = [])
    {
        $method = empty($options['method']) ? $options['method'] : '';
        if (in_array(strtolower($method), ['get', 'post'])) {
            $real_method = $method;
        } else {
            $real_method = 'POST';
        }
        $options['method'] = $real_method;
        $options['action'] = $this->location;

        return '<form '.$this->attributes($options).'>'.// Pass the method through so the form knows how to handle it's self (with laravel)
        $this->method($method).// Check and fill the csrf token if it's configured for it.
        $this->csrf().$this->buildForm().$this->submit([]).'</form>';
    }
public function form(array $options = [])
    {
        $method = empty($options['method']) ? $options['method'] : '';
        if (in_array(strtolower($method), ['get', 'post'])) {
            $real_method = $method;
        } else {
            $real_method = 'POST';
        }
        $options['method'] = $real_method;
        $options['action'] = $this->location;

        return '<form '.$this->attributes($options).'>'.// Pass the method through so the form knows how to handle it's self (with laravel)
        $this->method($method).// Check and fill the csrf token if it's configured for it.
        $this->csrf().$this->buildForm().$this->submit([]).'</form>';
    }
public function form ( array $ options = [ ] ) { $ method = empty ( $ options [ 'method' ] ) ? $ options [ 'method' ] : '' ; if ( in_array ( strtolower ( $ method ) , [ 'get' , 'post' ] ) ) { $ real_method = $ method ; } else { $ real_method = 'POST' ; } $ options [ 'method' ] = $ real_method ; $ options [ 'action' ] = $ this -> location ; return '<form ' . $ this -> attributes ( $ options ) . '>' . // Pass the method through so the form knows how to handle it's self (with laravel) $ this -> method ( $ method ) . // Check and fill the csrf token if it's configured for it. $ this -> csrf ( ) . $ this -> buildForm ( ) . $ this -> submit ( [ ] ) . '</form>' ; }
Generate the form.

@param array $options

@return string
Generate the form .