+ Add pagination to hyper and super history's routes
This commit is contained in:
parent
3b330e1595
commit
001d44eb69
|
@ -201,7 +201,9 @@ class NanoCreditController extends Controller
|
|||
|
||||
usort($merge, array($this, 'sortFunction')); // Trier le tout par date
|
||||
|
||||
return $this->successResponse($this->arrayPaginator($merge, $request));
|
||||
// return $this->successResponse($this->arrayPaginator($merge, $request));
|
||||
return $this->successResponse($merge);
|
||||
|
||||
}
|
||||
|
||||
public function getNanoCreditsDemands($id_user)
|
||||
|
|
|
@ -161,9 +161,7 @@ class WalletController extends Controller
|
|||
|
||||
usort($result, array($this, 'sortFunction')); // Trier le tout par date
|
||||
|
||||
// return $this->successResponse($this->arrayPaginator($result,$request));
|
||||
return $this->successResponse($result);
|
||||
|
||||
return $this->successResponse($this->arrayPaginator($result, $request));
|
||||
}
|
||||
|
||||
public function superHistory($id_wallet, Request $request)
|
||||
|
@ -213,8 +211,7 @@ class WalletController extends Controller
|
|||
|
||||
usort($result, array($this, 'sortFunction')); // Trier le tout par date
|
||||
|
||||
// return $this->successResponse($this->arrayPaginator($result,$request));
|
||||
return $this->successResponse($result);
|
||||
return $this->successResponse($this->arrayPaginator($result, $request));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1435,7 +1435,7 @@ class iLinkTransactionController extends Controller
|
|||
$weekly_sum = WalletIlinkTransaction::where('id_document_emetteur', $identifiant)->where('final_country', $final_country)->whereBetween('date', [Carbon::today()->subDay(7), Carbon::today()])->sum('montant');
|
||||
else
|
||||
$weekly_sum = WalletIlinkTransaction::where('id_wallet_user', $identifiant)->where('final_country', $final_country)->whereBetween('date', [Carbon::today()->subDay(7), Carbon::today()])->sum('montant');
|
||||
$max_hebdo = ($init_country == $final_country) ? $regulation->montant_max_hedbo_national : $regulation->montant_max_hedbo_international;
|
||||
$max_hebdo = ($init_country == $final_country) ? $regulation->montant_max_hebdo_national : $regulation->montant_max_hebdo_international;
|
||||
$amount_admitted = $max_hebdo - $weekly_sum;
|
||||
if (($weekly_sum + $montant_transaction) > $max_hebdo)
|
||||
return $this->errorResponse(($init_country == $final_country) ? trans('errors.national_weekly_regulations_limits_reached') : trans('errors.international_weekly_regulations_limits_reached') . ' '
|
||||
|
|
Loading…
Reference in New Issue