Update HomePageSettings to use file upload for background video: replace text input with FileUpload component, enforce file type and size restrictions, and adjust video source path in the homepage view for proper video display.
This commit is contained in:
@@ -141,10 +141,12 @@ class HomePageSettings extends SettingsPage
|
||||
->description('Upload or link the background video for the hero section.')
|
||||
->icon('heroicon-o-camera')
|
||||
->schema([
|
||||
TextInput::make('bg_video')
|
||||
->label('Background Video URL')
|
||||
->maxLength(255)
|
||||
->url()
|
||||
FileUpload::make('bg_video')
|
||||
->label('Background Video')
|
||||
->acceptedFileTypes(['video/mp4', 'video/webm', 'video/ogg'])
|
||||
->maxSize(51200) // 50MB
|
||||
->disk('public')
|
||||
->directory('homepage-videos')
|
||||
->required(),
|
||||
]),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user