在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):appstract/laravel-options开源软件地址(OpenSource Url):https://github.com/appstract/laravel-options开源编程语言(OpenSource Language):PHP 100.0%开源软件介绍(OpenSource Introduction):Laravel OptionsGlobal key-value store in the database InstallationTo get started with laravel-options, use Composer to add the package to your project's dependencies: composer require appstract/laravel-options Publish, migrateBy running UsageWith the // Get option
option('someKey');
// Get option, with a default fallback value if the key doesn't exist
option('someKey', 'Some default value if the key is not found');
// Set option
option(['someKey' => 'someValue']);
// Remove option
option()->remove('someKey');
// Check the option exists
option_exists('someKey'); If you want to check if an option exists, you can use the facade: use Option;
$check = Option::exists('someKey'); ConsoleIt is also possible to set options within the console: php artisan option:set {someKey} {someValue} Testing$ composer test ContributingContributions are welcome, thanks to y'all :) About AppstractAppstract is a small team from The Netherlands. We create (open source) tools for webdevelopment and write about related subjects on Medium. You can follow us on Twitter, buy us a beer or support us on Patreon. LicenseThe MIT License (MIT). Please see License File for more information. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论