PHP code example of vaibhavpandeyvpz / laravel-settings
1. Go to this page and download the library: Download vaibhavpandeyvpz/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/ */
vaibhavpandeyvpz / laravel-settings example snippets
# store a value
Settings::put('foo', 'bar');
settings(['foo' => 'bar']);
settings()->put('foo', 'bar');
settings('foo', 'bar');
settings()->put('foo', 'bar', false); // don't update in database yet
settings()->commit(); // save to database when you want
# retrieve a value
Settings::get('foo');
settings()->get('foo');
settings('foo');
# retrieve all values
Settings::all();
settings()->all();
# delete a value
Settings::forget('foo');
settings()->forget('foo');
settings()->forget('foo', false); // don't delete from database yet
settings()->commit(); // delete from database when you want
$ php artisan settings:cache
$ php artisan settings:clear
bash
$ php artisan vendor:publish
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.