first upload all files
This commit is contained in:
18
Modules/Coupon/Checkers/CouponExists.php
Normal file
18
Modules/Coupon/Checkers/CouponExists.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Coupon\Checkers;
|
||||
|
||||
use Closure;
|
||||
use Modules\Coupon\Exceptions\CouponNotExistsException;
|
||||
|
||||
class CouponExists
|
||||
{
|
||||
public function handle($coupon, Closure $next)
|
||||
{
|
||||
if (is_null($coupon)) {
|
||||
throw new CouponNotExistsException;
|
||||
}
|
||||
|
||||
return $next($coupon);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user