PHP code example of bagongd3 / filament-global-money

1. Go to this page and download the library: Download bagongd3/filament-global-money library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

bagongd3 / filament-global-money example snippets


return [
    'prefix' => 'Rp',              // Simbol mata uang di awal
    'suffix' => '',                // Jika ingin ada di akhir (contoh: "IDR")
    'decimal_separator' => ',',    // Simbol desimal
    'thousands_separator' => '.', // Simbol ribuan
    'decimals' => 2,               // Jumlah digit desimal
];

use Bagongd3\\GlobalMoney\\Forms\\Components\\MoneyInput;

MoneyInput::make('price'),

use Bagongd3\\FilamentGlobalMoney\\Tables\\Columns\\MoneyColumn;

MoneyColumn::make('amount'),

use Bagongd3\\FilamentGlobalMoney\\Infolists\\Components\\MoneyEntry;

MoneyEntry::make('total'),
bash
php artisan vendor:publish --tag=filament-global-money-config