77 lines
2.6 KiB
PHP
77 lines
2.6 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\Pages;
|
|
|
|
use App\Settings\SiteSocialSettings;
|
|
use Filament\Forms;
|
|
use Filament\Forms\Form;
|
|
use Filament\Pages\SettingsPage;
|
|
use Illuminate\Contracts\Support\Htmlable;
|
|
|
|
class ManageSiteSocialSettings extends SettingsPage
|
|
{
|
|
protected static ?int $navigationSort = 4;
|
|
|
|
protected static ?string $navigationIcon = 'heroicon-o-share';
|
|
|
|
protected static string $settings = SiteSocialSettings::class;
|
|
|
|
public function form(Form $form): Form
|
|
{
|
|
return $form
|
|
->schema([
|
|
Forms\Components\Section::make('Social Media Profiles')
|
|
->description('Links to your social media profiles')
|
|
->icon('heroicon-o-link')
|
|
->collapsible()
|
|
->schema([
|
|
Forms\Components\Grid::make()->schema([
|
|
Forms\Components\TextInput::make('facebook_url')
|
|
->label('Facebook URL')
|
|
->prefix('https://')
|
|
->helperText('e.g., facebook.com/yourpage'),
|
|
Forms\Components\TextInput::make('twitter_url')
|
|
->label('Twitter/X URL')
|
|
->prefix('https://')
|
|
->helperText('e.g., twitter.com/yourusername'),
|
|
Forms\Components\TextInput::make('instagram_url')
|
|
->label('Instagram URL')
|
|
->prefix('https://')
|
|
->helperText('e.g., instagram.com/yourusername'),
|
|
Forms\Components\TextInput::make('linkedin_url')
|
|
->label('LinkedIn URL')
|
|
->prefix('https://')
|
|
->helperText('e.g., linkedin.com/company/yourcompany'),
|
|
])->columns(2),
|
|
]),
|
|
])
|
|
->columns(3)
|
|
->statePath('data');
|
|
}
|
|
|
|
public static function getNavigationGroup(): ?string
|
|
{
|
|
return __('Settings');
|
|
}
|
|
|
|
public static function getNavigationLabel(): string
|
|
{
|
|
return 'Social Media';
|
|
}
|
|
|
|
public function getTitle(): string|Htmlable
|
|
{
|
|
return 'Site Social Media Settings';
|
|
}
|
|
|
|
public function getHeading(): string|Htmlable
|
|
{
|
|
return 'Site Social Media Settings';
|
|
}
|
|
|
|
public function getSubheading(): string|Htmlable|null
|
|
{
|
|
return 'Manage your social media profiles and sharing options';
|
|
}
|
|
}
|