wamesk/laravel-nova-price-tax-field
最新稳定版本:1.2.1
Composer 安装命令:
composer require wamesk/laravel-nova-price-tax-field
包简介
A Laravel Nova Price Tax Fields.
README 文档
README
Installation
composer require wamesk/laravel-nova-price-tax-field
php artisan vendor:publish --provider="Wame\PriceTaxField\FieldServiceProvider"
Usage
Add to your nova model
(You can change sort field but not in one column and getPriceTaxField must be last, in migration use decimal or double)
Add to your models
use Wame\PriceTaxField\PriceField; PriceField::getPriceWithoutTax( config('price-fields'), $this), PriceField::getPriceTax(config('price-fields'))->rules('required'), PriceField::getPriceWithTax(config('price-fields'))->rules('required'), PriceField::getPriceTaxField(config('price-fields'))->rules('required'),
Config
rconfig/price-fields.php
Translate
resource/lang/sk/price-fields.php
Customization
Edit options in config.price-fields.php OR you can add options in your model
// Price tax field options use Wame\PriceTaxField\PriceField; $price_tax_options = [ 'db_names' => ['base_price', 'tax', 'price_with_tax'], 'names' => ['bez DPH', 'daň', 's DPH'], 'base_field_name' => 'Cena', 'default_tax' => 20, 'one_col' => true, // display all fields in one column 'tax_in_one_col' => true, // not show tax value in one column 'col_classes' => ['strong', 'small', 'small'], // classes for rows in column ]; PriceField::getPriceWithoutTax( $price_tax_options, $this), PriceField::getPriceTax($price_tax_options)->rules('required'), PriceField::getPriceWithTax($price_tax_options)->rules('required'), PriceField::getPriceTaxField($price_tax_options)->rules('required'),
统计信息
- 总下载量: 91
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-03-15

