Search by

webwizardsusa / filament-resource-browser

webwizardsusa

Browse, select and create the records of one Filament resource from another, in a modal: pick an image for a post, or add a new one, without leaving the form.

Package info

github.com/webwizardsusa/filament-resource-browser

pkg:composer/webwizardsusa/filament-resource-browser

Statistics

Installs: 3

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.1.2 2026-11-19 16:39 UTC

This package is auto-updated.

Last update: 2026-11-20 02:22:10 UTC


README

Under active development. This package is still changing and may not be ready for production use yet. Until 1.0, a minor release can include breaking changes, so check the changelog before you upgrade.

Resource Browser: the Images resource browsed as cards in a modal, and the form to fill in for the picked image

Latest version on Packagist Tests Total downloads PHP version Filament version License

Reuse one Filament resource from another: browse its records in a modal, pick one to insert, or add or edit one without leaving the form you're in. Pick an image for a post from the images resource, for example, filling in its alt text as you insert it.

Browsing the Images resource as cards in a modal The picked image with its alt text, caption, style, alignment and width The picked image inserted into a rich editor

Requires PHP 8.3+ and Filament 5.

composer require webwizardsusa/filament-resource-browser
use Webwizardsusa\ResourceBrowser\BrowsableResource;
use Webwizardsusa\ResourceBrowser\Concerns\BrowsableFromResource;

class ImageBrowser extends BrowsableResource
{
    use BrowsableFromResource;

    public function resourceClass(): string
    {
        return ImageResource::class;
    }

    public function getBrowserSelectForm(Schema $schema, mixed $resource): Schema
    {
        return $schema->components([TextInput::make('alt')]);
    }

    public function fieldPreview(mixed $resource): mixed
    {
        return new HtmlString('<img src="'.e($resource?->url).'" alt="">');
    }
}
use Webwizardsusa\ResourceBrowser\Form\ResourceBrowserField;

ResourceBrowserField::make('image_id')->resourceBrowser(ImageBrowser::class);

Documentation

Read the full documentation in the docs folder.

About Us

This package is developed and maintained by WebWizardsUSA, a top rated web development agency on Upwork.

License

The MIT License (MIT). See LICENSE.md.