FleetCart/Modules/Coupon/Exceptions/CouponUsageLimitReachedException.php

22 lines
457 B
PHP
Raw Normal View History

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