laravel-form-builder
laravel-form-builder copied to clipboard
Integration dingo/api and vuejs,alpacajs or other frontend framework
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...