Add About Section to HomePageSettings and update HomePageController to include brand data. Modify HomeSettings to store new about section fields and update the homepage view to display these settings.

This commit is contained in:
2025-07-28 13:08:26 +05:00
parent d0985a71d5
commit b405cad6fe
8 changed files with 158 additions and 26 deletions

View File

@@ -7,6 +7,7 @@ use Filament\Forms\Components\Grid;
use Filament\Forms\Components\Section;
use Filament\Forms\Components\TextInput;
use Filament\Forms\Components\Textarea;
use Filament\Forms\Components\FileUpload;
use Filament\Forms\Form;
use Filament\Pages\Page;
use Filament\Pages\SettingsPage;
@@ -48,6 +49,78 @@ class HomePageSettings extends SettingsPage
])->columns(2),
]),
Section::make('About Section')
->description('Manage the about section content on the homepage.')
->icon('heroicon-o-building-office-2')
->schema([
TextInput::make('about_subtitle')
->label('About Subtitle')
->maxLength(100),
TextInput::make('about_header')
->label('About Header')
->required()
->maxLength(255),
Textarea::make('about_paragraph')
->label('About Paragraph')
->rows(5)
->maxLength(65535),
Grid::make()->schema([
TextInput::make('about_projects_text')
->label('Projects Text')
->maxLength(100),
TextInput::make('about_projects_number')
->label('Projects Number')
->numeric(),
])->columns(2),
Grid::make()->schema([
TextInput::make('about_members_text')
->label('Members Text')
->maxLength(100),
TextInput::make('about_members_number')
->label('Members Number')
->numeric(),
])->columns(2),
Grid::make()->schema([
TextInput::make('about_reviews_text')
->label('Reviews Text')
->maxLength(100),
TextInput::make('about_reviews_number')
->label('Reviews Number')
->numeric(),
])->columns(2),
Grid::make()->schema([
TextInput::make('about_button_text')
->label('About Button Text')
->maxLength(50),
TextInput::make('about_button_url')
->label('About Button URL')
->maxLength(255)
->url(),
])->columns(2),
Grid::make()->schema([
FileUpload::make('about_image_one')
->label('About Image One (245x410)')
->image()
->maxSize(2048)
->disk('public')
->directory('about-images'),
FileUpload::make('about_image_two')
->label('About Image Two (375x391)')
->image()
->maxSize(2048)
->disk('public')
->directory('about-images'),
])->columns(2),
]),
Section::make('Background Video')
->description('Upload or link the background video for the hero section.')
->icon('heroicon-o-camera')