user()->is_admin; } /** @return array */ public function rules(): array { /** @var User $user */ $user = $this->route('user'); return [ 'name' => 'required', 'email' => 'required|email|unique:users,email,' . $user->id, ]; } }