feat: add create a new admin for admin panel

This commit is contained in:
2026-08-20 15:41:30 +03:30
parent bac158916a
commit 86346350f8
6 changed files with 200 additions and 40 deletions
@@ -0,0 +1,50 @@
<?php
namespace App\Http\Requests\Admins;
use Illuminate\Contracts\Validation\ValidationRule;
use Illuminate\Foundation\Http\FormRequest;
class AdminStorePostRequest 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<mixed>|string>
*/
public function rules(): array
{
return [
'first_name' => [
'required',
'string',
'max:255'
],
'last_name' => [
'required',
'string',
'max:255'
],
'email' => [
'required',
'email',
'max:255',
'unique:admins,email'
],
'password' => [
'required',
'string',
'min:8',
'confirmed'
],
];
}
}