lumen-form-request
lumen-form-request copied to clipboard
Call to a member function parameter() on array
hi, thank you for this package
this error occured for me
Call to a member function parameter() on array
get id from route same below:
return[
'name' => 'unique:roles,name,' . $this->route('id'),
];
but $this->route() return array
hi
use this function overwrite to class
public function route($param = null, $default = null)
{
$route = ($this->getRouteResolver())();
if (is_null($route) || is_null($param)) {
return $route;
}
return Arr::get($route[2], $param, $default);
}