PHP code example of damodar-bhattarai / filament-settings
1. Go to this page and download the library: Download damodar-bhattarai/filament-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/ */
damodar-bhattarai / filament-settings example snippets
use DamodarBhattarai\FilamentSettings\FilamentSettingsPlugin;
public function panel(Panel $panel): Panel
{
return $panel
// ... your other configuration
->plugins([
FilamentSettingsPlugin::make(),
]);
}
// Get a single setting value
$siteName = settings('site_name');
// Get with a default fallback
$logo = settings('logo', 'default-logo.png');
// Get all settings as a collection
$all = settings();