amzad78692/filament-app-settings
最新稳定版本:v1.0.2
Composer 安装命令:
composer require amzad78692/filament-app-settings
包简介
README 文档
README
This package adds a way to interact with outerweb/settings in Filament.
Installation
You can install the package via composer:
composer require amzad78692/filament-app-settings
You can install the package via composer:
php artisan settings:install
Usage
Create a settings page at 'app/Filament/Pages/Settings.php':
<?php namespace App\Filament\Pages; use Amzad78692\FilamentAppSettings\Pages\SettingsPage; use Filament\Forms\Components\FileUpload; use Filament\Forms\Components\TextInput; use Filament\Schemas\Components\Tabs; use Filament\Schemas\Components\Tabs\Tab; use Illuminate\Contracts\Support\Htmlable; class Settings extends SettingsPage { public function schema(): array { return [ Tabs::make('Settings') ->schema([ Tab::make('General') ->schema([ TextInput::make('general.website_name.en') ->label(__('Website name') . '(en)'), TextInput::make('general.website_name.ar') ->label(__('Website name') . '(ar)'), FileUpload::make('general.logo') ->image() ->directory('settings'), FileUpload::make('general.favicon') ->image() ->directory('settings'), ])->columns(2), Tab::make('Contact') ->schema([ TextInput::make('contact.email') ->email(), TextInput::make('contact.mobile') ->tel() ->telRegex('/^[+]*[(]{0,1}[0-9]{1,4}[)]{0,1}[-\s\.\/0-9]*$/'), TextInput::make('contact.whatsapp') ->tel() ->telRegex('/^[+]*[(]{0,1}[0-9]{1,4}[)]{0,1}[-\s\.\/0-9]*$/'), TextInput::make('contact.address'), ])->columns(2), ]), ]; } }
Changing the navigation label
You can change the navigation label by overriding the getNavigationLabel method:
namespace App\Filament\Pages; use Amzad78692\FilamentAppSettings\Pages\SettingsPage; class Settings extends SettingsPage { public static function getNavigationLabel(): string { return 'Custom label'; } }
Changing the page title
You can change the page title by overriding the getTitle method:
namespace App\Filament\Pages; use Amzad78692\FilamentAppSettings\Pages\SettingsPage; class Settings extends SettingsPage { public function getTitle(): string { return 'Custom title'; } }
Credits
统计信息
- 总下载量: 35
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-09-07