PHP code example of riipandi / laravel-opsi
1. Go to this page and download the library: Download riipandi/laravel-opsi library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
riipandi / laravel-opsi example snippets
// 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']);
// Check the option exists
option_exists('someKey');
use Option;
$check = Option::exists('someKey');
bash
php artisan option:set {someKey} {someValue}