PATH:
home
/
rwabteecom
/
project_11
/
app
/
Http
/
Requests
/
Admin
/
User
/
Editing: UserRequest.php
<?php namespace App\Http\Requests\Admin\User; use Illuminate\Foundation\Http\FormRequest; class UserRequest extends FormRequest { public function rules(): array { return [ "name" => "required|string", "email" => "required|string|email:rfc,dns|unique:users,email," . $this->route('user'), "full_number" => "required|string|unique:users,phone," . $this->route('user'), "password" => $this->isMethod("PUT") ? "nullable|confirmed|min:6" : "required|confirmed|min:6", ]; } public function authorize(): bool { return true; } }
SAVE
CANCEL