lms/app/Http/Requests/StoreUserRequest.php
Ahmed Darrazi 6fba63daf5
All checks were successful
Build & Push Docker Image / docker (push) Successful in 1m49s
added add user function
2025-12-18 18:10:01 +01:00

31 lines
755 B
PHP

<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class StoreUserRequest 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, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
*/
public function rules(): array
{
return [
'name' => ['required', 'string', 'max:255'],
'email' => ['required', 'string', 'lowercase', 'email', 'max:255', 'unique:users,email'],
'status' => ['required', 'integer', 'in:0,1'],
];
}
}