Updated the role request so that the role you are updating is ignored when checking for uniqueness

parent 69375ad2
......@@ -8,9 +8,11 @@ class RolesRequest extends FormRequest
{
public function rules()
{
$roleID = $this->route('roles');
return [
'name' => 'required',
'slug' => 'required|unique:roles,slug',
'slug' => 'required|unique:roles,slug,' . $roleID . ',id',
];
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment