FleetCart/Modules/Coupon/Exceptions/CouponUsageLimitReachedException.php
2023-12-03 14:07:47 +00:00

22 lines
457 B
PHP

<?php
namespace Modules\Coupon\Exceptions;
use Exception;
use Illuminate\Http\JsonResponse;
class CouponUsageLimitReachedException extends Exception
{
/**
* Render the exception into an HTTP response.
*
* @return JsonResponse
*/
public function render(): JsonResponse
{
return response()->json([
'message' => trans('coupon::messages.usage_limit_reached'),
], 403);
}
}