PHPackages                             livewire-filemanager/filament-plugin - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. livewire-filemanager/filament-plugin

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

livewire-filemanager/filament-plugin
====================================

Filament plugin for Livewire Filemanager — adds a file picker button to the RichEditor

v1.0.0(3mo ago)00MITPHPPHP ^8.2

Since Mar 22Pushed 3mo agoCompare

[ Source](https://github.com/livewire-filemanager/filament-plugin)[ Packagist](https://packagist.org/packages/livewire-filemanager/filament-plugin)[ RSS](/packages/livewire-filemanager-filament-plugin/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (4)Versions (2)Used By (0)

Filament Filemanager
====================

[](#filament-filemanager)

A [Filament](https://filamentphp.com) plugin that adds a **file picker button** to the RichEditor toolbar, powered by [Livewire Filemanager](https://github.com/livewire-filemanager/filemanager).

Users can browse, search, and insert files directly from the RichEditor. Images are inserted as `` tags, other files as download links.

Requirements
------------

[](#requirements)

- PHP 8.2+
- Filament 4.x or 5.x
- [livewire-filemanager/filemanager](https://github.com/livewire-filemanager/filemanager) ^1.0 (with API enabled)
- [Laravel Sanctum](https://laravel.com/docs/sanctum) (the filemanager API uses `auth:sanctum`)

Installation
------------

[](#installation)

### 1. Install the package

[](#1-install-the-package)

```
composer require livewire-filemanager/filament-plugin
```

The service provider is auto-discovered. No manual registration needed.

### 2. Install Laravel Sanctum

[](#2-install-laravel-sanctum)

The filemanager API routes are protected by the `auth:sanctum` guard. If Sanctum is not already installed in your project:

```
composer require laravel/sanctum
php artisan vendor:publish --provider="Laravel\Sanctum\SanctumServiceProvider"
php artisan migrate
```

> **Note:** Filament uses cookie-based session authentication. Sanctum's stateful authentication works out of the box with Filament sessions — no API tokens needed. Just make sure your domain is listed in `SANCTUM_STATEFUL_DOMAINS` in your `.env` if you're using a custom domain:
>
> ```
> SANCTUM_STATEFUL_DOMAINS=filament.test
> ```

### 3. Publish the config (optional)

[](#3-publish-the-config-optional)

```
php artisan vendor:publish --tag=filemanager-filament-config
```

This creates `config/filemanager-filament.php`:

```
return [
    'api_url' => env('FILEMANAGER_API_URL', '/api/filemanager/v1'),
    'lang' => env('FILEMANAGER_LANG', 'en'),
    'toolbar_label' => 'Files',
];
```

Usage
-----

[](#usage)

### Register the plugin in your Panel

[](#register-the-plugin-in-your-panel)

```
use LivewireFilemanager\Filament\FilemanagerPlugin;

class AdminPanelProvider extends PanelProvider
{
    public function panel(Panel $panel): Panel
    {
        return $panel
            // ...
            ->plugins([
                FilemanagerPlugin::make(),
            ]);
    }
}
```

### Add it to a RichEditor field

[](#add-it-to-a-richeditor-field)

```
use LivewireFilemanager\Filament\FilemanagerPlugin;

RichEditor::make('content')
    ->plugins([
        FilemanagerPlugin::make(),
    ])
```

A **"Files"** button appears in the toolbar. Clicking it (or pressing `Ctrl+Shift+F` / `Cmd+Shift+F`) opens the file browser modal.

### Full-page filemanager

[](#full-page-filemanager)

You can also add a dedicated filemanager page to your panel. Create a Filament page:

```
// app/Filament/Pages/Filemanager.php
