Files
Motula-Translate-Backend/app/Http/Requests/UpdateRoleRequest.php
c.girardi e6f3fcbb4e Implement roles management;
Add user profile;
Improve Ui;
Clean code;
Minor fix;
Typo;
2024-02-21 16:56:08 +01:00

30 lines
664 B
PHP

<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class UpdateRoleRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return false;
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
*/
public function rules(): array
{
return [
'name' => 'required|string|max:250|unique:roles,name,'.$this->role->id,
'permissions' => 'required',
];
}
}