[ 'instrumentos_registro' => [ ['codigo' => '01', 'nome' => 'BPA (CONSOLIDADO)'], ['codigo' => '02', 'nome' => 'BPA (INDIVIDUALIZADO)'], ], ], 'model' => [ 'bpa_intrumento_registro_padrao' => $configuracao->bpa_intrumento_registro_padrao ?? null, ], ]; } public static function update($request) { self::validate($request); return tap(Configuracao::first())->update($request->all()); } private static function validate($request) { return $request->validate([ 'bpa_intrumento_registro_padrao' => [ 'required', Rule::in(['01', '02']), ], ]); } }