method()) { case 'POST': return $this->getPostRules(); default: return []; } } private function getPostRules() { return [ 'arquivo' => [ 'required', 'array', ], 'arquivo.*' => [ 'distinct', 'mimes:doc,pdf,png,jpeg', 'max:2048', ], 'pedido_exame_id' => [ 'required', 'integer', 'exists:\App\Models\ProntoAtendimento\PedidoExame\PedidoExame,id' ] ]; } }