Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Search Text Transformer Laravel Package

becklyn/search-text-transformer

Converts HTML into clean, searchable plain text for indexing with search engines like Elasticsearch. Use SearchTextTransformer to strip tags and normalize content, making page text suitable for full‑text search and highlighting.

View on GitHub
Deep Wiki
Context7

Search Text Transformer

Transforms HTML to searchable plain text for usage in conjunction with a search engine (like Elasticsearch).

Installation

Install via composer.

Usage

<?php

use Becklyn\SearchText\SearchTextTransformer;

$transformer = new SearchTextTransformer();
$plain = $transformer->transform("<p>Some HTML content</p>");

Testing

All test cases belong into tests/fixtures and must have the file extension .test.

The test format is:

--TEST--
Here is a plain text description of this test.
--HTML--
<p>Some html.</p>
--EXPECT--
The expected result.

The --TEST-- segment is optional.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
oxygen/data
oxygen/core
jengo/base
xiloryx/log-collector
a21ns1g4ts/filament-stripe
la-php/laravel-admin
artisan-build/community-prompts
vleroy/smart
ayles-software/laravel-australian-public-holidays
cboxdk/laravel-id-spatie
cboxdk/laravel-id-billing
cboxdk/laravel-id-billing-bridge
simple-as-fuck/php-performance-log
hsluv/hsluv
seampact/codegen
seampact/hooks
seampact/ir
mehedimi/laravel-amp-mail
happones/laravel-vue-i18n-generator
jwerd/inertia-table