PHP code example of jobmetric / laravel-setting

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

    

jobmetric / laravel-setting example snippets


use JobMetric\Setting\Facades\Setting as SettingFacade;

SettingFacade::dispatch('config', [
    'config_name' => 'job metric',
    'config_url' => 'jobmetric.net',
    'config_address' => [
        'city' => 'Mashhad',
        'street' => 'Pastor',
        'postal_code' => '1234567890',
    ],
]);

use JobMetric\Setting\Facades\Setting as SettingFacade;

$config_name = SettingFacade::get('config_name');

use JobMetric\Setting\Facades\Setting as SettingFacade;

$settings = SettingFacade::all();

use JobMetric\Setting\Facades\Setting as SettingFacade;

SettingFacade::forget('config');

use JobMetric\Setting\Facades\Setting as SettingFacade;

$has = SettingFacade::has('config_name');

dispatchSetting('config', [
    'config_name' => 'job metric',
    'config_url' => 'jobmetric.net',
    'config_address' => [
        'city' => 'Mashhad',
        'street' => 'Pastor',
        'postal_code' => '1234567890',
    ],
]);

forgetSetting('config');

$config_name = getSetting('config_name');

$settings = codeSettings('config');

$has = hasSetting('config_name');
bash
php artisan migrate