Closed BenRutlandWeb closed 3 years ago
AddMany
and deleteMany
are nice simple methods to loop internally, getMany
needs a bit more thought to cater for defaults. Perhaps:
[$option_one, $option_2] = Option::getMany([
'option_1' => 'default',
'option_2' => 'default',
]);
...with 'default' being the fallback if the value isn't found in the options table. I remember seeing this pattern somewhere in Laravel.
Is your feature request related to a problem? Please describe. When activating/deactivating a plugin, it would be great to set/delete multiple global options.
Describe the solution you'd like Additional methods on the
Option
facade to add and delete (and maybe get?) options.Describe alternatives you've considered Manually looping over options.