Account Balance / Wallets Manager For FilamentPHP and Filament Account Builder
tomatophp/filament-wallet is a Laravel package for account balance / wallets manager for filamentphp and filament account builder.
It currently has 37 GitHub stars and 31.906 downloads on Packagist (latest version 4.0.0).
Install it with composer require tomatophp/filament-wallet.
Discover more Laravel packages by tomatophp
or browse all Laravel packages to compare alternatives.
Last updated

Account Balance / Wallets Manager For FilamentPHP and Filament Account Builder
you can get more details about how to use this package in Bavix Wallet

composer require tomatophp/filament-wallet
after installing your package, please run this command
php artisan filament-wallet:install
finally register the plugin on /app/Providers/Filament/AdminPanelProvider.php
->plugin(\TomatoPHP\FilamentWallet\FilamentWalletPlugin::make())
to add a wallet to your user model on your model add this trait
namespace App\Models;
use Bavix\Wallet\Interfaces\Wallet;
use Bavix\Wallet\Traits\HasWalletFloat;
class Account extends Model implements Wallet
{
use HasWalletFloat;
}
now your model is having a wallet on your resource add this action to your table
use TomatoPHP\FilamentWallet\Filament\Actions\WalletAction;
public function table(Table $table): void
{
$table->actions([
WalletAction::make('wallet'),
]);
}
now yo can charge the wallet of the user by clicking on the wallet action
first you need to install Filament Account Builder
composer require tomatophp/filament-account
then you need to publish the model file
php artisan vendor:publish --tag="filament-accounts-model"
then you can use this model in your project and attach this traits to your model
namespace App\Models;
use Bavix\Wallet\Interfaces\Wallet;
use Bavix\Wallet\Traits\HasWalletFloat;
class Account extends Model implements Wallet
{
use HasWalletFloat;
}
now your accounts have a balance ready.
finally, register the plugin on /app/Providers/Filament/AdminPanelProvider.php
->plugin(\TomatoPHP\FilamentWallet\FilamentWalletPlugin::make()->useAccounts())
if you like to run PEST testing just use this command
composer test
if you like to fix the code style just use this command
composer format
if you like to check the code by PHPStan just use this command
composer analyse
Checkout our Awesome TomatoPHP