PHP code example of rinvex / laravel-settings

1. Go to this page and download the library: Download rinvex/laravel-settings 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/ */

    

rinvex / laravel-settings example snippets


$value = setting('meta.description');

// Retrieve a default value if the configuration value does not exist...
$value = config('meta.description', 'Rinvex Settings is a Laravel package for setting management.');

config(['meta.description' => 'You can add, update, and delete application settings with ease, and use like the detaul Laravel config options.']);

// Retrieve individual setting
$metaKeywords = setting('meta.keywords');
$metaDescription = setting('meta.description');

// Retrieve individual setting of an overridden config option
$appName = setting(‘app.name’);

// Retrieve group of settings
$meta = setting('meta’);

// Retrieve a default value if the setting value does not exist
$metaAuthor = setting('meta.author', 'Abdelrahman Omran');

// Set runtime setting values
setting(['meta.author' => 'Omranic']);
setting(['new.setting.key’ => Some Value Here!']);
shell
    php artisan rinvex:publish:settings
    
shell
    php artisan rinvex:migrate:settings