PHPackages                             tapp/filament-library - 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. [File &amp; Storage](/categories/file-storage)
4. /
5. tapp/filament-library

ActiveLibrary[File &amp; Storage](/categories/file-storage)

tapp/filament-library
=====================

A Google Drive-like file management system for Filament

v1.3.3(3w ago)4206↓76.9%2[3 PRs](https://github.com/TappNetwork/Filament-Library/pulls)MITPHPPHP ^8.3CI passing

Since Sep 29Pushed 4w agoCompare

[ Source](https://github.com/TappNetwork/Filament-Library)[ Packagist](https://packagist.org/packages/tapp/filament-library)[ Docs](https://github.com/TappNetwork/Filament-Library)[ GitHub Sponsors](https://github.com/TappNetwork)[ RSS](/packages/tapp-filament-library/feed)WikiDiscussions main Synced today

READMEChangelog (10)Dependencies (42)Versions (30)Used By (0)

Filament Library Plugin
=======================

[](#filament-library-plugin)

A comprehensive file and document management system for Filament applications, featuring Google Drive-style permissions, automatic inheritance, and flexible access controls.

Features
--------

[](#features)

- **📁 File &amp; Folder Management** - Upload files, create folders, and organize content
- **🔗 External Links** - Add and manage external links with descriptions (including video embeds)
- **👥 Advanced Permissions** - Google Drive-style ownership with Creator, Owner, Editor, and Viewer roles
- **🔄 Automatic Inheritance** - Permissions automatically inherit from parent folders
- **🔍 Multiple Views** - Public Library, My Documents, Shared with Me, Created by Me, Favorites, and Search All
- **🏷️ Tags &amp; Favorites** - Organize items with tags and mark favorites for quick access
- **⚙️ Configurable Admin Access** - Flexible admin role configuration
- **🎨 Filament Integration** - Native Filament UI components and navigation
- **🏢 Multi-Tenancy Support** - Optional team/organization scoping for all library content

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

[](#installation)

You can install the package via composer:

```
composer require tapp/filament-library
```

### Database Setup

[](#database-setup)

The package will automatically publish and run migrations. You'll need to add the `LibraryUser` trait to your User model:

```
// app/Models/User.php
use Tapp\FilamentLibrary\Traits\LibraryUser;

class User extends Authenticatable
{
    use LibraryUser;
    // ... other traits and methods
}
```

Warning

If you are using multi-tenancy please see the "Multi-Tenancy Support" instructions below **before** publishing and running migrations.

You can publish and run the migrations with:

```
php artisan vendor:publish --tag="filament-library-migrations"
php artisan migrate
```

You can publish the config file with:

```
php artisan vendor:publish --tag="filament-library-config"
```

Basic Usage
-----------

[](#basic-usage)

### 1. Add to Filament Panel

[](#1-add-to-filament-panel)

```
use Tapp\FilamentLibrary\FilamentLibraryPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugins([
            FilamentLibraryPlugin::make(),
        ]);
}
```

### 2. Configure Admin Access

[](#2-configure-admin-access)

```
// In your AppServiceProvider
use Tapp\FilamentLibrary\FilamentLibraryPlugin;

public function boot()
{
    // Option 1: Use different role name
    FilamentLibraryPlugin::setLibraryAdminCallback(function ($user) {
        return $user->hasRole('super-admin');
    });

    // Option 2: Custom logic
    FilamentLibraryPlugin::setLibraryAdminCallback(function ($user) {
        return $user->is_superuser || $user->hasRole('library-manager');
    });
}
```

### 3. Navigation

[](#3-navigation)

The plugin automatically adds navigation items under "Resource Library":

- **Library** - Main library view
- **Search All** - Search across all accessible content
- **My Documents** - Personal documents and folders
- **Shared with Me** - Items shared by other users
- **Created by Me** - Items you created
- **Favorites** - Items you've marked as favorites

Permissions System
------------------

[](#permissions-system)

The plugin features a sophisticated permissions system inspired by Google Drive.

### Quick Overview

[](#quick-overview)

- **Creator** - Permanent, always has access, cannot be changed
- **Owner** - Manages sharing, can be transferred, has full permissions
- **Editor** - Can view and edit content, cannot manage sharing
- **Viewer** - Can only view content

### Automatic Permissions

[](#automatic-permissions)

- **Personal Folders** - Automatically created for new users
- **Permission Inheritance** - Child items inherit parent folder permissions
- **Admin Override** - Library admins can access all content

Multi-Tenancy Support
---------------------

[](#multi-tenancy-support)

Filament Library includes built-in support for multi-tenancy, allowing you to scope library items, permissions, and tags to specific tenants (e.g., teams, organizations, workspaces).

### ⚠️ Important: Enable Tenancy Before Migrations

[](#️-important-enable-tenancy-before-migrations)

**You MUST configure and enable tenancy in the config file BEFORE running the migrations.** The migrations check the tenancy configuration to determine whether to add tenant columns to the database tables. If you enable tenancy after running migrations, you'll need to manually add the tenant columns to your database.

### Quick Setup

[](#quick-setup)

1. **Configure your Filament panel with tenancy** (see [Filament Tenancy docs](https://filamentphp.com/docs/4.x/users/tenancy))
2. **Publish the config file**: ```
    php artisan vendor:publish --tag="filament-library-config"
    ```
3. **Enable tenancy in `config/filament-library.php`**: ```
    'tenancy' => [
        'enabled' => true, // ⚠️ Set this BEFORE running migrations!
        'model' => \App\Models\Team::class,
    ],
    ```
4. **Run migrations**: ```
    php artisan migrate
    ```

For complete setup instructions, troubleshooting, and advanced configuration, see [TENANCY.md](TENANCY.md).

Configuration
-------------

[](#configuration)

The config file (`config/filament-library.php`) includes the following options:

### User Model

[](#user-model)

```
'user_model' => env('FILAMENT_LIBRARY_USER_MODEL', 'App\\Models\\User'),
```

Specify the user model for the application.

### Video Link Support (Optional)

[](#video-link-support-optional)

The library supports video links from various platforms. To customize supported domains, add this to your config:

```
'video' => [
    'supported_domains' => [
        'youtube.com',
        'youtu.be',
        'vimeo.com',
        'wistia.com',
    ],
],
```

### Secure File URLs (Optional)

[](#secure-file-urls-optional)

Configure how long temporary download URLs remain valid:

```
'url' => [
    'temporary_expiration_minutes' => 60, // Default: 60 minutes
],
```

### Admin Access Configuration (Optional)

[](#admin-access-configuration-optional)

To configure which users can access admin features, add this to your config:

```
'admin_role' => 'Admin', // Role name to check
'admin_callback' => null, // Custom callback function
```

Or set it programmatically in your `AppServiceProvider`:

```
use Tapp\FilamentLibrary\FilamentLibraryPlugin;

public function boot()
{
    FilamentLibraryPlugin::setLibraryAdminCallback(function ($user) {
        return $user->hasRole('super-admin');
    });
}
```

**Note:** By default, users have an `isLibraryAdmin()` method that returns `false`. You can override this in your User model for custom logic.

Events
------

[](#events)

The package dispatches events your application can listen for to extend behavior (for example, search indexing, webhooks after uploads, ...).

### `LibraryFileStored`

[](#libraryfilestored)

[`Tapp\FilamentLibrary\Events\LibraryFileStored`](src/Events/LibraryFileStored.php) is fired after a new file is stored on a library item: when Spatie Media Library creates a `Media` record for a `LibraryItem` whose `type` is `file`.

The event exposes:

- `$libraryItem` — the [`LibraryItem`](src/Models/LibraryItem.php) the file was attached to
- `$media` — the new [`Media`](https://github.com/spatie/laravel-medialibrary) model instance, or `null` if not available in edge cases

Example listener registration in `AppServiceProvider`:

```
use Illuminate\Support\Facades\Event;
use Tapp\FilamentLibrary\Events\LibraryFileStored;

public function boot(): void
{
    Event::listen(LibraryFileStored::class, function (LibraryFileStored $event): void {
        // e.g. dispatch a job here
    });
}
```

### `LibraryFileRestored`

[](#libraryfilerestored)

[`Tapp\FilamentLibrary\Events\LibraryFileRestored`](src/Events/LibraryFileRestored.php) is fired after a soft-deleted `LibraryItem` of type `file` is restored (for example via Filament's Restore action).

The event exposes:

- `$libraryItem` — the restored [`LibraryItem`](src/Models/LibraryItem.php)
- `$media` — the item's first [`Media`](https://github.com/spatie/laravel-medialibrary) record, or `null` if none is attached

Example listener registration in `AppServiceProvider`:

```
use Illuminate\Support\Facades\Event;
use Tapp\FilamentLibrary\Events\LibraryFileRestored;

public function boot(): void
{
    Event::listen(LibraryFileRestored::class, function (LibraryFileRestored $event): void {
        // e.g. re-index or re-ingest RAG chunks here
    });
}
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

49

—

FairBetter than 94% of packages

Maintenance91

Actively maintained with recent releases

Popularity19

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~16 days

Recently: every ~1 days

Total

14

Last Release

22d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7796074?v=4)[Scott Grayson](/maintainers/scottgrayson)[@scottgrayson](https://github.com/scottgrayson)

---

Top Contributors

[![andreia](https://avatars.githubusercontent.com/u/38911?v=4)](https://github.com/andreia "andreia (36 commits)")[![scottgrayson](https://avatars.githubusercontent.com/u/7796074?v=4)](https://github.com/scottgrayson "scottgrayson (24 commits)")[![swilla](https://avatars.githubusercontent.com/u/304159?v=4)](https://github.com/swilla "swilla (21 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (5 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (2 commits)")

---

Tags

laravellibraryfilamenttappfile management

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/tapp-filament-library/health.svg)

```
[![Health](https://phpackages.com/badges/tapp-filament-library/health.svg)](https://phpackages.com/packages/tapp-filament-library)
```

###  Alternatives

[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)[slimani/filament-media-manager

A media manager plugin for Filament.

126.9k](/packages/slimani-filament-media-manager)[stephenjude/filament-jetstream

A Laravel starter kit built with Filament inspired by Jetstream.

17760.2k3](/packages/stephenjude-filament-jetstream)[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M47](/packages/spatie-laravel-pdf)[croustibat/filament-jobs-monitor

Background Jobs monitoring like Horizon for all drivers for FilamentPHP

274325.8k8](/packages/croustibat-filament-jobs-monitor)[stephenjude/filament-debugger

About

104162.2k2](/packages/stephenjude-filament-debugger)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
