laravel-form-builder icon indicating copy to clipboard operation
laravel-form-builder copied to clipboard

Integration dingo/api and vuejs,alpacajs or other frontend framework

Open lichnow opened this issue 8 years ago • 0 comments

if it can integration dingo/api like symfony's form builder and fosrestbundle? i change the request to my request before form builder

class Request extends BaseRequest
{
    public function session()
    {
        if (! $this->hasSession()) {
            return $this;
        }
        return $this->getSession();
    }

    public function get($key, $default = null)
    {
        if ($key == 'errors'){
            return [];
        }
        return parent::get($key, $default);
    }
}

the problem is in class FormField

protected function addErrorClass()
    {
        $errors = $this->parent->getRequest()->session()->get('errors');
...
    }

when it in restful controller,has no session,and do this,validator can not work...

lichnow avatar Feb 13 '17 16:02 lichnow