Documents Editor
Manage your documents and contracts all in one place with template builder
Author:
Fady Mondy
Documentation
- Features
- Screenshots
- Installation
- Using
- Add Fixed Header & Footer to Document Print
- Custom CSS on Document Print
- Allow Tenants
- Publish Assets
- Other Filament Packages

Manage your documents and contracts all in one place with template builder
#Features
- Generate Documents From Template
- Build Template using Tiptop Editor
- 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

#Installation
composer require tomatophp/filament-docs
after install your package please run this command
php artisan filament-docs:install
if you are not using this package as a plugin please 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
#Add Fixed Header & Footer to Document Print
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
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
The author
Manage your documents and contracts all in one place with template builder
From the same author
Tenancy Multi-database
Tenancy multi-database integration for FilamentPHP
Author:
Fady Mondy
Menu Generator
Menu view generator using view component
Author:
Fady Mondy
Translations Manager
Manage your translation with DB and cache, you can scan an collect translation strings like `trans()` and `__()`, and translate them using UI
Author:
Fady Mondy
Meta Manager
Convert any model on your app to pluggable model using Meta and get ready to use relation manager on FilamentPHP panel
Author:
Fady Mondy
Featured Plugins
A selection of plugins curated by the Filament team
Custom Dashboards
Let your users build and share their own dashboards with a drag-and-drop interface. Define your data sources in PHP and let them do the rest.
Filament
Advanced Tables (formerly Filter Sets)
Supercharge your tables with powerful features like user-customizable views, quick filters, multi-column sorting, advanced table searching, convenient view management, and more. Compatible with Resource Panel Tables, Relation Managers, Table Widgets, and Table Builder!
Kenneth Sese
Data Lens
Advanced Data Visualization for Laravel Filament - a premium reporting solution enabling custom column creation, sophisticated filtering, and enterprise-grade data insights within admin panels.
Padmission