1. Go to this page and download the library: Download camc/lara-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/ */
camc / lara-settings example snippets
Camc\LaraSettings\LaraSetting::create(['key' => 'foo', 'value' => 'bar']);
// with a helper
lara_settings('foo'); // bar
// or with the facade
LaraSettings::get('foo'); // bar
Camc\LaraSettings\Models\LaraSetting::whereKey('foo')->first()->delete();
lara_settings('foo', 'deleted'); // deleted
// a setting instance will be created if not yet defined
LaraSettings::set('foo', null);
lara_settings('foo', 'null value'); // "null value"
LaraSettings::fake(['a_fake_key' => 'a fake value']);
// database/seeders
/**
* Only load settings if the file is present
*/
class LaraSettingsSeeder extends Seeder
{
public function run()
{
$settingsFile = }
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.