|
@@ -15,7 +15,7 @@ class Bet extends Controller
|
|
|
|
|
|
|
|
function index()
|
|
function index()
|
|
|
{
|
|
{
|
|
|
- try {
|
|
|
|
|
|
|
+// try {
|
|
|
$params = request()->validate([
|
|
$params = request()->validate([
|
|
|
'page' => ['nullable', 'integer', 'min:1'],
|
|
'page' => ['nullable', 'integer', 'min:1'],
|
|
|
'limit' => ['nullable', 'integer', 'min:1'],
|
|
'limit' => ['nullable', 'integer', 'min:1'],
|
|
@@ -58,11 +58,11 @@ class Bet extends Controller
|
|
|
$item['is_winner'] = $item['profit'] > 0;
|
|
$item['is_winner'] = $item['profit'] > 0;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- } catch (ValidationException $e) {
|
|
|
|
|
- return $this->error(HttpStatus::VALIDATION_FAILED, $e->validator->errors()->first());
|
|
|
|
|
- } catch (Exception $e) {
|
|
|
|
|
- return $this->error(intval($e->getCode()));
|
|
|
|
|
- }
|
|
|
|
|
|
|
+// } catch (ValidationException $e) {
|
|
|
|
|
+// return $this->error(HttpStatus::VALIDATION_FAILED, $e->validator->errors()->first());
|
|
|
|
|
+// } catch (Exception $e) {
|
|
|
|
|
+// return $this->error(intval($e->getCode()));
|
|
|
|
|
+// }
|
|
|
return $this->success($result);
|
|
return $this->success($result);
|
|
|
}
|
|
}
|
|
|
|
|
|