theodorejb/polycast
theodorejb/polycast brings type-safe casting to PHP: a simple Cast class converts values to int, float, bool, string, array, or DateTime, throwing clear exceptions when a value can't be cast instead of silently coercing it.
Polycast is a lightweight PHP library for safely casting values to specific types, such as integers, floats, strings, booleans, and dates. It provides a clean, extensible API that handles edge cases predictably—making it useful for validating and normalizing input from requests, configs, or databases.
How can I help you explore Laravel packages today?