Initial commit
This commit is contained in:
15
app/Exceptions/InsufficientBalance.php
Normal file
15
app/Exceptions/InsufficientBalance.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Exceptions;
|
||||
|
||||
use App\Models\Wallet;
|
||||
|
||||
class InsufficientBalance extends ApiException
|
||||
{
|
||||
public function __construct(public readonly Wallet $wallet, public readonly int $amount)
|
||||
{
|
||||
parent::__construct(message: 'Insufficient balance in wallet.', code: 'INSUFFICIENT_BALANCE', status: 400);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user