PHP code example of devfactory / variables

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

    

devfactory / variables example snippets


'Devfactory\Variables\VariablesServiceProvider',

'Variables' => 'Devfactory\Variables\Facades\VariablesFacade',

Route::group(array('before' => 'admin-auth'), function() {
  Route::controller('variables', '\Devfactory\Variables\Controllers\VariablesController');
});

    'Devfactory\Variables\VariablesServiceProvider',

    'Variables' => 'Devfactory\Variables\Facades\VariablesFacade',

    Route::group(array('before' => 'admin-auth'), function() {
        Route::controller('variables', 'Devfactory\Variables\Controllers\VariablesController');
    });



$api_key = Variables::get('api_key'); // da46f8af58aec448c784dd421660f7635d404feb



// Retrieve an array of all the variables
Variables::getAll();

// Set the value of a variable
Variables::set('api_key', 'da46f8af58aec448c784dd421660f7635d404feb');

// Unset the value of a variable stored in the DB
Variables::remove('api_key');