PHP

★ Introducing our new Laravel Options package

[AdSense-A]

When developing web applications, you probably encounter a lot of places where someone needs to select one or more options in a (multi-)select. These select boxes always need a list of options with labels and values.

In one of our projects, we had options being generated in lots of places. Sometimes these lists of options were the same, leading to a lot of code duplication. Even worse, in some cases, different formats were used to output the same options.

That's why we've created a new package called spatie/laravel-options. It will take a resource which can create options such as an enum, a list of models or even a plain array. And will always create a standardized array of options you can use within your frontend application.

(more…)

By , ago