tomatophp / filament-wallet
Account Balance / Wallets Manager For FilamentPHP and Filament Account Builder
Fund package maintenance!
fadymondy
Installs: 25 744
Dependents: 2
Suggesters: 0
Security: 0
Stars: 33
Watchers: 1
Forks: 8
Open Issues: 1
pkg:composer/tomatophp/filament-wallet
Requires
- php: ^8.2|^8.3|^8.4
- bavix/laravel-wallet: ^10.0|^11.0
- filament/filament: ^4.0
- tomatophp/console-helpers: ^1.1
Requires (Dev)
- larastan/larastan: ^2.9||^3.0
- laravel/pint: ^1.14
- nunomaduro/collision: ^8.1.1||^7.10.0
- orchestra/testbench: ^10.0.0||^9.0.0
- pestphp/pest: ^3.0
- pestphp/pest-plugin-arch: ^3.0
- pestphp/pest-plugin-laravel: ^3.0
- pestphp/pest-plugin-livewire: ^3.0
- pestphp/pest-plugin-type-coverage: ^3.5
- phpstan/extension-installer: ^1.3||^2.0
- phpstan/phpstan-deprecation-rules: ^1.1||^2.0
- phpstan/phpstan-phpunit: ^1.3||^2.0
README
Filament Wallet
Account Balance / Wallets Manager For FilamentPHP and Filament Account Builder
you can get more details about how to use this package in Bavix Wallet
Screenshots
Installation
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())
Usage
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
Integration With Filament Accounts
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())
Testing
if you like to run PEST testing just use this command
composer test
Code Style
if you like to fix the code style just use this command
composer format
PHPStan
if you like to check the code by PHPStan just use this command
composer analyse
Other Filament Packages
Checkout our Awesome TomatoPHP




