spatie/laravel-options
Generate unified select option lists in Laravel from enums, Eloquent models, states, and arrays. Spatie laravel-options converts sources to a consistent label/value structure, supports customization via config, and makes building dropdowns and filters faster and cleaner.
Adopt if:
Look elsewhere if:
For Executives: "This package lets us build consistent, maintainable dropdowns faster—imagine cutting 20% of the time spent manually mapping enums or database records to select options. It’s like a ‘copy-paste’ for form UIs, reducing bugs and tech debt. Low risk (MIT license, Spatie’s track record), high reward for admin panels, user settings, or any form-heavy feature."
For Engineers:
*"Spatie’s laravel-options unifies option formatting (label/value) for enums, Eloquent models, or arrays into a single API call. Example:
Options::forEnum(UserRole::class)->toArray();
// Returns: [{label: 'Admin', value: 'admin'}, ...]
composer.json, replace 3 manual dropdown mappings in the admin panel by EOD."*How can I help you explore Laravel packages today?