marshmallow / priceable
Package for handeling prices
Installs: 6 197
Dependents: 2
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 2
Requires
- php: ^8.0|^8.1
- laravel/nova: ^4.0
- marshmallow/commands: ^1.0
- marshmallow/helpers: ^2.0
- marshmallow/sluggable: ^1.0
- moneyphp/money: ^v4.0.3
- dev-master
- v3.1.1
- v3.1.0
- v3.0.0
- v2.2.0
- v2.1.0
- v2.0.1
- v2.0.0
- v1.6.0
- v1.5.2
- v1.5.1
- v1.5.0
- v1.4.4
- v1.4.3
- v1.4.2
- v1.4.1
- v1.4.0
- v1.3.3
- v1.3.2
- v1.3.1
- v1.3.0
- v1.2.1
- v1.2.0
- v1.1.2
- v1.1.1
- v1.1.0
- v1.0.4
- v1.0.3
- v1.0.2
- v1.0.1
- dev-dependabot/github_actions/overtrue/phplint-9.0
- dev-dependabot/github_actions/actions/checkout-4
- dev-nova4
- dev-development
This package is auto-updated.
Last update: 2024-11-18 15:36:02 UTC
README
Marshmallow Products
Deze package gaat alle logica houden voor producten. Producten zullen in het algemeen gebruikt worden in combinatie met de Cart of Ecommerce package.
Installatie
composer require marshmallow/priceable
Vendor Publish
...
php artisan vendor:publish --provider="Marshmallow\Priceable\PriceableServiceProvider" --tag="config" --force
Methods
Currency::getUserCurrent(); Currency::getExceptUserCurrent()
Routes
@foreach (\Marshmallow\Priceable\Models\Currency::get() as $currency) <a href="{{ route('set-currency', $currency) }}"> {{ $currency->name }} </a> @endforeach
Available methods
currentPrice() isDiscounted() discountedFrom()
CURRENCY=eur
php artisan db:seed --class=Marshmallow\Product\Database\Seeds\VatRatesSeeder
To do
php artisan marshmallow:resource Price Priceable
php artisan marshmallow:resource VatRate Priceable
php artisan marshmallow:resource Currency Priceable
php artisan marshmallow:resource PriceType Priceable
Tests
Priceable is_can_make_use_of_the_price_facade
Currency //
VAT //
Price it_has_one_currency it_has_one_vat_rate it_makes_use_of_default_vatrate_id it_makes_use_of_default_currency_id it_calculates_including_price_correctly_from_excluding_amount it_calculates_excluding_price_correctly_from_excluding_amount it_calculates_vat_amount_correctly_from_excluding_amount it_calculates_including_price_correctly_from_including_amount it_calculates_excluding_price_correctly_from_including_amount it_calculates_vat_amount_correctly_from_including_amount it_returns_a_carbon_instance_for_valid_from it_returns_a_carbon_instance_for_valid_till
Extra
factory(Marshmallow\Product\Models\Product::class, 10)->create();
Tests during development
php artisan test packages/marshmallow/priceable
...