PHP code example of ichbin / filament-settings

1. Go to this page and download the library: Download ichbin/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/ */

    

ichbin / filament-settings example snippets


return [
    // Group the menu item belongs to
    'group' => 'Settings',
    // Sidebar label
    'label' => 'Settings',
    // Path to the file to be used as storage
    'path' => storage_path('app/settings.json'),
];

\IchBin\FilamentSettings\FilamentSettings::setFormFields([
    \Filament\Forms\Components\TextInput::make('title'),
]);

public function canManageSettings(): bool
{
    return $this->can('manage.settings');
}
shell
php artisan vendor:publish --tag=filament-settings-config
shell
php artisan vendor:publish --tag=filament-settings-views

{{ setting('key') }}