fix and improve the code

This commit is contained in:
2025-10-25 15:00:38 +03:30
parent a542914cc3
commit 0272aa0c9f
5 changed files with 65 additions and 34 deletions

View File

@@ -23,8 +23,12 @@ class StoreRequest extends FormRequest
public function rules(): array
{
return [
'role_name' => 'required|string',
'permissions' => 'required'
'name' => 'required|string|unique:roles,name',
'name_fa' => 'required|string',
'description' =>'string',
'for_report' => 'in:0,1',
'permissions' => 'array',
'permissions.*' => 'integer|exists:permissions,id'
];
}
}