test-yield/app/Exceptions/InsufficientBalance.php
2024-12-03 21:27:44 +01:00

16 lines
356 B
PHP

<?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);
}
}