components([ Select::make('type') ->required() ->options([ 'player' => 'Allgemeinflächen', 'events' => 'Objekte', 'bild' => 'Begleitmaterial Bild', 'pdf' => 'Begleitmaterial PDF', ]), FileUpload::make('file_name') ->label('Begleitmaterial') ->disk('public') ->directory(fn () => 'projekte/'.$this->getOwnerRecord()) ->visibility('public') ->required() ->storeFileNamesIn('file_name_original') ->beforeContent(Icon::make('phosphor-upload')) ->belowContent(Schema::end([ 'Only excel files accepted.', 'First row contains column titles.', ])) ->acceptedFileTypes([ 'application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', // 'text/csv', // Optional: include if you accept CSV too ]), ]); } public function table(Table $table): Table { return $table ->emptyStateHeading('Keine Daten oder Dokumente') ->emptyStateDescription('Allgmeine .') ->recordTitleAttribute('projekte_id') ->columns([ TextColumn::make('projekte_id') ->searchable(), ]) ->filters([ // ]) ->headerActions([ CreateAction::make(), AssociateAction::make(), ]) ->recordActions([ EditAction::make(), DissociateAction::make(), DeleteAction::make(), ]) ->toolbarActions([ BulkActionGroup::make([ DissociateBulkAction::make(), DeleteBulkAction::make(), ]), ]); } }