PHP code example of reworck / filament-settings

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

    

reworck / 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'),
];

\Reworck\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