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

#Testing The separation of code in this package between Application, Domain and Infrastructure make it easy to (unit) test how your app works with it. When you want to test the integration of your app with this Explorer, it can help you with mocking the raw responses Elasticsearch may give. It does not fully test the integration with Elasticsearch, but it does allow testing without having a live Elasticsearch instance. The responses that the Elasticsearch client returns are replaced with fake responses at a low level, meaning that the rest of the application does not need to work with mocks.

Here is an example of a Laravel feature test:

<?php

declare(strict_types=1);

namespace Tests\Feature\Api;

use JeroenG\Explorer\Infrastructure\Elastic\FakeResponse;
use Tests\TestCase;

class SearchControllerTest extends TestCase
{
    public function test_it_returns_results(): void
    {
        $fakeResponseFile = fopen(base_path("tests/Support/Elastic/Responses/example.json"), 'rb');
        
        $fakeResponse = new FakeResponse($statusCode, $fakeResponseFile);
        
        // see https://laravel.com/docs/mocking for more information
        $this->instance(ElasticClientFactory::class, ElasticClientFactory::fake($fakeResponse));

        $response = $this->post('api/search');

        $response->assertStatus(200);
    }
}

You can see an example of a raw Elastic response in the tests/Support folder of Explorer.

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.
cuci/prototurk-sdk-symfony
clementtalleu/easyadmin-markdown-bundle
codeflextech/permission-manager
karnoweb/livewire-datepicker
sayedenam/sayed-dashboard
milito/query-filter
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager