spatie/weight-conversions
Lightweight PHP package for converting between common weight units (e.g., grams, kilograms, pounds, ounces). Handy for apps needing consistent unit handling in calculations, forms, and APIs, with a simple, dependency-free API.
Adopt if:
Look elsewhere if:
For Executives: "This package lets us add weight conversions in hours—not weeks—by leveraging Spatie’s battle-tested PHP library. For example, a global e-commerce site can instantly display product weights in kg or lbs based on user location, improving UX and reducing support costs. It’s a low-risk, high-reward ‘buy’ that eliminates dev overhead and ensures accuracy. MIT license means no vendor lock-in."
For Engineering:
*"Spatie’s weight-conversions is a 5-minute install (composer require spatie/weight-conversions) with zero dependencies. It handles all standard units (grams, kg, lbs, oz, stones) via a clean API:
use Spatie\WeightConversions\Facades\WeightConversions;
$kg = WeightConversions::convert(150, 'lbs', 'kg'); // Returns 68.0388555
How can I help you explore Laravel packages today?