40 lines
1.3 KiB
PHP
40 lines
1.3 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\Pages;
|
|
|
|
use App\Settings\CtaSettings;
|
|
use Filament\Forms;
|
|
use Filament\Forms\Form;
|
|
use Filament\Pages\SettingsPage;
|
|
use Filament\Forms\Components\FileUpload;
|
|
|
|
class ManageCtaSettings extends SettingsPage
|
|
{
|
|
protected static ?string $navigationGroup = 'CMS';
|
|
protected static ?string $navigationLabel = 'Call To Action';
|
|
protected static ?string $navigationIcon = 'heroicon-o-megaphone';
|
|
|
|
protected static string $settings = CtaSettings::class;
|
|
|
|
public function form(Form $form): Form
|
|
{
|
|
return $form
|
|
->schema([
|
|
Forms\Components\TextInput::make('title')
|
|
->label('Call To Action Title')
|
|
->required(),
|
|
Forms\Components\TextInput::make('button_text')
|
|
->label('Button Text')
|
|
->required(),
|
|
Forms\Components\TextInput::make('button_url')
|
|
->label('Button URL')
|
|
->required()
|
|
->url(),
|
|
FileUpload::make('background_image')
|
|
->label('Background Image 1320x408')
|
|
->directory('settings')
|
|
->image()
|
|
->columnSpan('full'),
|
|
]);
|
|
}
|
|
}
|