1. Go to this page and download the library: Download shopapps/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/ */
shopapps / laravel-settings example snippets
// Read a setting (falls back to config(), then null)
$siteName = setting('site.name');
// Read with a default
$perPage = setting('pagination.per_page', 15);
// Write a setting
setting_add('site.name', 'My Application');
// Delete a setting
setting_delete('site.name');
// Returns: DB value → config() fallback → null
$value = setting('mail.from_address');
// With an explicit default (skips config fallback)
$value = setting('mail.from_address', '[email protected]');
// For the currently authenticated user
$value = setting('theme', 'light', true);
// For a specific user
$value = setting('theme', 'light', $userId);
setting_add('notifications', ['email' => true, 'sms' => false], 'array');
// Read a nested value
$emailEnabled = setting('notifications.email'); // true