illuminate/conditionable
Add fluent, chainable conditional logic to Laravel objects. The Conditionable trait provides when/unless helpers to apply callbacks only when conditions are met, keeping pipelines and builders clean and readable without scattered if/else blocks.
illuminate/support.if/else is more straightforward (e.g., single-line checks without chaining).when() and unless()—eliminating nested if statements and improving readability. It’s battle-tested, requires no extra dependencies, and integrates seamlessly with Laravel’s ecosystem, making it ideal for dynamic data processing in models, collections, and services."How can I help you explore Laravel packages today?