schema([ Section::make('Review Form') ->schema([ TextInput::make('heading'), FileUpload::make('image')->image()->imageCropAspectRatio('16:9') ->enableDownload()->directory('slider') ->getUploadedFileNameForStorageUsing(function (TemporaryUploadedFile $file): string { return (string) str($file->getClientOriginalName())->prepend(now()->timestamp); }), Grid::make(1) ->schema([ Textarea::make('text'), ]) ])->columns(2) ]); } public static function table(Table $table): Table { return $table ->columns([ TextColumn::make('heading')->searchable(), ImageColumn::make('image'), TextColumn::make('text')->limit(60), ]) ->filters([ // Tables\Filters\TrashedFilter::make(), ]) ->actions([ Tables\Actions\EditAction::make(), ]); } public static function getRelations(): array { return [ // ]; } public static function getPages(): array { return [ 'index' => Pages\ListSliders::route('/'), 'create' => Pages\CreateSlider::route('/create'), 'edit' => Pages\EditSlider::route('/{record}/edit'), ]; } public static function getEloquentQuery(): Builder { return parent::getEloquentQuery() ->withoutGlobalScopes([ SoftDeletingScope::class, ]); } }