PHP code example of subham / filament-dynamic-settings
1. Go to this page and download the library: Download subham/filament-dynamic-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/ */
subham / filament-dynamic-settings example snippets
use Subham\FilamentDynamicSettings\Facades\Settings;
// Get a setting (cached, with type formatting)
$value = Settings::get('app_name', 'general', 'Default App Name');
// Get a raw setting value (no cache, no formatting)
$raw = Settings::raw('app_name', 'general', 'Default App Name');
// Set a setting value (updates existing, invalidates cache)
Settings::set('app_name', 'My Application', 'general');
// Get all settings for a module
$allGeneral = Settings::module('general');
// In multi-tenant mode (tenant ID is auto-detected)
$value = Settings::get('app_name', 'general', 'Default App Name');
// Explicitly specify tenant
$value = Settings::get('app_name', 'general', 'Default App Name', $tenantId);