1. Go to this page and download the library: Download phpinnacle/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/ */
use Illuminate\Database\Eloquent\Casts\Attribute;
use PHPinnacle\Money\Money;
protected function price(): Attribute
{
return Money::attribute('price', 'currency');
}
use PHPinnacle\Money\Forms\CurrencyPicker;
use PHPinnacle\Money\Forms\MoneyInput;
use PHPinnacle\Money\Tables\MoneyColumn;
MoneyInput::make('price')
->currencies(['USD', 'EUR'], 'USD')
->
use PHPinnacle\Money\Rules\CurrencyCode;
use PHPinnacle\Money\Rules\MoneyRule;
return [
'currency' => [new CurrencyCode],
'maximum' => ['
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.