New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

tomatophp/filament-docs

Manage your documents and contracts all in one place with template builder
2,768 45
Install
composer require tomatophp/filament-docs
Latest Version:5.0.0
PHP:^8.2
Laravel:11 · 12 · 13
License:MIT
Last Updated:Oct 15, 2026
Links: GitHub  ·  Packagist
Maintainer: fadymondy

Screenshot

Filament Documents Editor

Dependabot Updates PHP Code Styling Tests Latest Stable Version License Downloads

Manage your documents and contracts all in one place with template builder

Version Compatibility

Plugin Filament Laravel PHP
5.x 5.x 12.x - 13.x 8.2+
2.x 3.x 10.x - 11.x 8.1+

Features

  • Generate Documents From Template
  • Build Template using Filament Rich Editor
  • Self-contained styled print page (no CDN)
  • Add Custom Vars By Facade
  • Generate Documents Action
  • Documents Filter By Template
  • Print Document or Export as PDF
  • Documents Relation Manager
  • Custom Print Header & Footer
  • Custom Print CSS

Screenshots

Try it live on demo.tomatophp.com.

Demo dark Demo light Print view

Documents Create Document Documents Filters Print Document Templates Create Template Edit Template Edit Template Vars Edit Template Icons Document Action Document Relation Manager Generate Document Generate Document Notification

Installation

composer require tomatophp/filament-docs:^5.0

after install your package please run this command

php artisan filament-docs:install

then register the plugin on /app/Providers/Filament/AdminPanelProvider.php

->plugin(
    \TomatoPHP\FilamentDocs\FilamentDocsPlugin::make()
)

Using

you can add the action to any table like this

use TomatoPHP\FilamentDocs\Filament\Actions\DocumentAction;

DocumentAction::make()
    ->vars(fn($record) => [
        DocsVar::make('$ACCOUNT_NAME')
            ->value($record->name),
        DocsVar::make('$ACCOUNT_EMAIL')
            ->value($record->email),
        DocsVar::make('$ACCOUNT_PHONE')
            ->value($record->phone)
    ])

and then you can use $ACCOUNT_NAME in your template

if you like to add a Global Var you can use Facade class like this

use TomatoPHP\FilamentDocs\Facades\FilamentDocs;
use TomatoPHP\FilamentDocs\Services\Contracts\DocsVar;

public function boot()
{
    FilamentDocs::register([
        DocsVar::make('$POST_TITLE')
            ->label('Post Title')
            ->model(Post::class)
            ->column('title'),
        DocsVar::make('$POST_TYPE')
            ->label('Post Type')
            ->model(Post::class)
            ->column('type'),
        DocsVar::make('$SELECTED_TIME')
            ->label('SELECTED TIME')
            ->value(fn () => Carbon::now()->subDays(10)->translatedFormat('D-M-Y')),
    ]);
}

as you can see you can use data from selected table or from a static function

if you like to add a fixed header and footer to your document print you can use this method on your AppServiceProvider.php file

use TomatoPHP\FilamentDocs\Facades\FilamentDocs;

public function boot() {
    FilamentDocs::header('filament.header');
    FilamentDocs::footer('filament.footer');
} 

Custom CSS on Document Print

the print page ships its own stylesheet (headings, lists, tables, blockquotes, code) and loads nothing from a CDN. if you like to add a custom css to your document print you can use this method on your AppServiceProvider.php file

use TomatoPHP\FilamentDocs\Facades\FilamentDocs;

public function boot() {
    FilamentDocs::css('filament.css');
} 

Allow Tenants

to allow tenants just use this method

->plugin(
    \TomatoPHP\FilamentDocs\FilamentDocsPlugin::make()
        ->isScopedToTenant()
)

and add this migration

<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::table('documents', function (Blueprint $table) {
            $table->foreignId('team_id')->nullable()->constrained('teams')->onDelete('cascade');
        });
        
        Schema::table('document_templates', function (Blueprint $table) {
            $table->foreignId('team_id')->nullable()->constrained('teams')->onDelete('cascade');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('documents', function (Blueprint $table) {
            $table->dropForeign(['team_id']);
            $table->dropColumn('team_id');
        });
        
        Schema::table('document_templates', function (Blueprint $table) {
            $table->dropForeign(['team_id']);
            $table->dropColumn('team_id');
        });
    }
};

Publish Assets

you can publish config file by use this command

php artisan vendor:publish --tag="filament-docs-config"

you can publish views file by use this command

php artisan vendor:publish --tag="filament-docs-views"

you can publish languages file by use this command

php artisan vendor:publish --tag="filament-docs-lang"

you can publish migrations file by use this command

php artisan vendor:publish --tag="filament-docs-migrations"

Other Filament Packages

Checkout our Awesome TomatoPHP

Related Packages

tomatophp/filament-wallet

Account Balance / Wallets Manager For FilamentPHP and Filament Account Builder

33,498 38
tomatophp/filament-subscriptions

Manage subscriptions and feature access with customizable plans in FilamentPHP

10,139 64
bfg/dto

The data transfer object pattern for Laravel

1,175 0
tomatophp/filament-social

Integration of social media platform actions and auth to your FilamentPHP panel

754 14
tomatophp/filament-plugins

Manage your modules as a plugin system with plugin generator

5,054 65

Version History

Version Released PHP License
5.0.0 ^8.2 MIT
2.0.0 ^8.2|^8.3|^8.4 MIT
v1.0.2 ^8.1|^8.2 MIT
v1.0.1 ^8.1|^8.2 MIT
v1.0.0 ^8.1|^8.2 MIT