create new option for this project and dependency for this object

This commit is contained in:
2025-10-25 10:35:08 +03:30
parent 6e03e27e45
commit a542914cc3
6 changed files with 172 additions and 80 deletions

View File

@@ -0,0 +1,30 @@
<?php
namespace App\Http\Requests\V3\Dashboard\RoleManageMent;
use Illuminate\Contracts\Validation\ValidationRule;
use Illuminate\Foundation\Http\FormRequest;
class StoreRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, ValidationRule|array|string>
*/
public function rules(): array
{
return [
'role_name' => 'required|string',
'permissions' => 'required'
];
}
}

View File

@@ -0,0 +1,30 @@
<?php
namespace App\Http\Requests\V3\Dashboard\RoleManageMent;
use Illuminate\Contracts\Validation\ValidationRule;
use Illuminate\Foundation\Http\FormRequest;
class UpdateRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, ValidationRule|array|string>
*/
public function rules(): array
{
return [
'role_name' => 'required|string',
'permissions' => 'required'
];
}
}