PHP code example of marekskopal / orm-decimal
1. Go to this page and download the library: Download marekskopal/orm-decimal 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/ */
marekskopal / orm-decimal example snippets
use Decimal\Decimal;
use MarekSkopal\ORM\Attribute\Entity;
use MarekSkopal\ORM\Decimal\Attribute\ColumnDecimal;
#[Entity]
class Product
{
#[ColumnDecimal(precision: 8, scale: 2)]
public Decimal $price;
#[ColumnDecimal(precision: 10, scale: 4, nullable: true)]
public ?Decimal $discount;
}