Weave Code
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

Explorer Laravel Package

jeroen-g/explorer

Laravel-friendly, fluent API for exploring and filtering directories and files. Chain common queries (name, extension, size, modified time), include/exclude patterns, sort and paginate results, and iterate over matches with clean, expressive code.

View on GitHub
Deep Wiki
Context7

Preparing data

Text analysis is perfect when you want to alter how Elasticsearch deals with a query, or with the data when it is being indexed. However, sometimes you do not necessarily want to meddle with analyzer, but rather just make a quick change to the data before it is indexed, perhaps conditionally.

For this, Explorer gives you the ability to 'prepare' your searchable data. To use this you will need to implement the JeroenG\Explorer\Application\BePrepared interface on your model and add the prepare($data) function. The data that is passed to the prepare function is what Laravel Scout generates in the toSearchableArray() method.

The prepared data might be very simple:

public function prepare(array $searchable): array
{
    $searchable['name'] = ucfirst($searchable['name']);

    return $searchable;
}

Or you could use something like Laravel's pipelines to do much more complex stuff:

public function prepare(array $searchable): array
{
    $searchable['content'] = (new Illuminate\Pipeline\Pipeline())
                ->send($searchable['content'])
                ->through([
                    App\Formatters\ConvertMarkdown::class,              
                    App\Formatters\StripTags::class,
                    App\Formatters\EncodeEmoji::class,
                ])
                ->thenReturn();

    return $searchable;
}
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.
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope