PHP code example of scriptingbeating / laravel-global-settings
1. Go to this page and download the library: Download scriptingbeating/laravel-global-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/ */
scriptingbeating / laravel-global-settings example snippets
bash
php artisan vendor:publish --provider="ScriptingBeating\GlobalSetting\GlobalSettingServiceProvider" --tag="migrations"
bash
php artisan migrate
php
global_setting()->all();
global_setting($key); // global_setting('app_name');
global_setting()->get($key, $default = null);
global_setting()->set($key, $value);
global_setting()->set($key, $value, $type = 'string');
global_setting()->has($key);
global_setting()->remove($key);
php
GlobalSetting::all();
GlobalSetting::get($key, $default = null);
GlobalSetting::set($key, $value);
GlobalSetting::set($key, $value, $type = 'string');
GlobalSetting::has($key);
GlobalSetting::remove($key);