1. Go to this page and download the library: Download outerweb/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/ */
outerweb / filament-settings example snippets
use Outerweb\FilamentSettings\Filament\Plugins\FilamentSettingsPlugin;
class FilamentPanelProvider extends PanelProvider
{
public function panel(Panel $panel): Panel
{
return $panel
// ...
->plugins([
FilamentSettingsPlugin::make()
->pages([
// Add your own setting pages here
])
]);
}
}
namespace App\Filament\Pages\Settings;
use Closure;
use Filament\Forms\Components\Tabs;
use Filament\Forms\Components\TextInput;
use Outerweb\FilamentSettings\Filament\Pages\Settings as BaseSettings;
class Settings extends BaseSettings
{
public function schema(): array|Closure
{
return [
Tabs::make('Settings')
->schema([
Tabs\Tab::make('General')
->schema([
TextInput::make('general.brand_name')
->
use Outerweb\FilamentSettings\Filament\Plugins\FilamentSettingsPlugin;
class FilamentPanelProvider extends PanelProvider
{
public function panel(Panel $panel): Panel
{
return $panel
// ...
->plugins([
FilamentSettingsPlugin::make()
->pages([
App\Filament\Pages\Settings\Settings::class,
])
]);
}
}
namespace App\Filament\Pages\Settings;
use Outerweb\FilamentSettings\Filament\Pages\Settings as BaseSettings;
class Settings extends BaseSettings
{
public static function getNavigationLabel(): string
{
return 'Custom label';
}
}
namespace App\Filament\Pages\Settings;
use Outerweb\FilamentSettings\Filament\Pages\Settings as BaseSettings;
class Settings extends BaseSettings
{
public function getTitle(): string
{
return 'Custom title';
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.