All Projects → appstract → Laravel Options

appstract / Laravel Options

Licence: mit
Global key-value store in the database

Projects that are alternatives of or similar to Laravel Options

Backup
MySQL Database backup package for Laravel
Stars: ✭ 66 (-89.46%)
Mutual labels:  database, laravel, laravel-package
Laravel Database Logger
Log database query sql in Laravel Application, support Guard,Auth to multiple file record
Stars: ✭ 31 (-95.05%)
Mutual labels:  database, laravel, laravel-package
Laravel Scout Postgres
PostgreSQL Full Text Search Engine for Laravel Scout
Stars: ✭ 140 (-77.64%)
Mutual labels:  database, laravel, laravel-package
Laravel Translatable
It's a Laravel database translations manager
Stars: ✭ 47 (-92.49%)
Mutual labels:  database, laravel, laravel-package
Laravel Sync Migration
Developer tool helps to sync migrations without refreshing the database
Stars: ✭ 89 (-85.78%)
Mutual labels:  database, laravel, laravel-package
Lara Lens
Laravel package for display diagnostic (config, database, http connections...)
Stars: ✭ 96 (-84.66%)
Mutual labels:  database, laravel, laravel-package
Laravel Db Profiler
Database Profiler for Laravel Web and Console Applications.
Stars: ✭ 141 (-77.48%)
Mutual labels:  database, laravel, laravel-package
Telegram
✈️ Telegram Notifications Channel for Laravel
Stars: ✭ 450 (-28.12%)
Mutual labels:  laravel, laravel-package
Laravel Js Localization
🌐 Convert your Laravel messages and consume them in the front-end!
Stars: ✭ 451 (-27.96%)
Mutual labels:  laravel, laravel-package
Redislite
Redis in a python module.
Stars: ✭ 464 (-25.88%)
Mutual labels:  database, key-value
Laravel Decomposer
⚙️ A Laravel package to decompose your installed packages, their dependencies, your app & server environment
Stars: ✭ 488 (-22.04%)
Mutual labels:  laravel, laravel-package
Statamic
Statamic 3: The New Site/App Package
Stars: ✭ 431 (-31.15%)
Mutual labels:  laravel, laravel-package
Sharp
Laravel 6+ Content management framework
Stars: ✭ 430 (-31.31%)
Mutual labels:  laravel, laravel-package
Framework
The truly Laravel E-commerce Framework
Stars: ✭ 456 (-27.16%)
Mutual labels:  laravel, laravel-package
Performance
⏱ PHP performance tool analyser your script on time, memory usage and db query. Support Laravel and Composer for web, web console and command line interfaces.
Stars: ✭ 429 (-31.47%)
Mutual labels:  database, laravel
Laravel Backup
A package to backup your Laravel app
Stars: ✭ 4,752 (+659.11%)
Mutual labels:  database, laravel
Lada Cache
A Redis based, fully automated and scalable database cache layer for Laravel
Stars: ✭ 424 (-32.27%)
Mutual labels:  database, laravel
Aimeos Laravel
Laravel ecommerce package for professional, ultra fast online shops, complex B2B applications and #gigacommerce
Stars: ✭ 5,204 (+731.31%)
Mutual labels:  laravel, laravel-package
Analogue
Analogue ORM : Data Mapper ORM for Laravel/PHP
Stars: ✭ 618 (-1.28%)
Mutual labels:  database, laravel
Lmdbjava
Lightning Memory Database (LMDB) for Java: a low latency, transactional, sorted, embedded, key-value store
Stars: ✭ 546 (-12.78%)
Mutual labels:  database, key-value

Laravel Options

Latest Version on Packagist Total Downloads Software License Build Status

Global key-value store in the database

Installation

To get started with laravel-options, use Composer to add the package to your project's dependencies:

composer require appstract/laravel-options

Publish, migrate

By running php artisan vendor:publish --provider="Appstract\Options\OptionsServiceProvider" in your project all files for this package will be published. For this package, it's only a migration. Run php artisan migrate to migrate the table. There will now be an options table in your database.

Usage

With the option() helper, we can get and set options:

// 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');

Console

It is also possible to set options within the console:

php artisan option:set {someKey} {someValue}

Testing

$ composer test

Contributing

Contributions are welcome, thanks to y'all :)

About Appstract

Appstract 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.

License

The MIT License (MIT). Please see License File for more information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].