3neti/instruction
A lightweight Laravel package for defining, organizing, and executing reusable instructions through a clean, expressive API. Reduce duplication, keep logic readable, and integrate seamlessly into any PHP or Laravel application.
php artisan migrate. Pay attention to columns storing price_minor and price-history records; these are the persistence foundation for the new pricing engine.'5.00') or an integer minor-unit value (500). Do not pass floats.price as a decimal string and price_minor as an integer.price_minor and total_amount_minor for sums, comparisons, discounts, and persistence; convert to decimal only at the API boundary.price_minor and total_amount_minor to integers, and return price and total_amount as decimal strings. Do not let Eloquent or JSON casting silently turn decimal strings into floats.(float) conversions, form requests accepting numeric values without validation, and seeders using 5.0. Replace them with '5.00' or 500.price and price_minor in the same sum is the quickest way to introduce rounding errors.100 multiplier.price_minor to integer is appropriate; casting decimal price fields to float or decimal:2 can change the serialized type. Prefer explicit DTO/resource formatting.price_minor is correct but price is wrong, the issue is usually serialization or a float cast rather than pricing logic.How can I help you explore Laravel packages today?