PHPackages                             cskiller/filament-id-generator - 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. cskiller/filament-id-generator

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

cskiller/filament-id-generator
==============================

A Filament plugin for bulk ID card generation with a visual template editor

5.x-dev(1mo ago)01[2 PRs](https://github.com/cskiller24/filament-id-generator/pulls)MITPHPPHP ^8.3CI passing

Since May 2Pushed 1mo agoCompare

[ Source](https://github.com/cskiller24/filament-id-generator)[ Packagist](https://packagist.org/packages/cskiller/filament-id-generator)[ Docs](https://github.com/cskiller/filament-id-generator)[ GitHub Sponsors](https://github.com/cskiller)[ RSS](/packages/cskiller-filament-id-generator/feed)WikiDiscussions 5.x Synced 1w ago

READMEChangelogDependencies (10)Versions (3)Used By (0)

Filament ID Generator
=====================

[](#filament-id-generator)

[![Latest Version on Packagist](https://camo.githubusercontent.com/271e4f4ddb470d183bf0a0acdf5a54300f169ae7863785901f3ba04036ccaf53/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f63736b696c6c65722f66696c616d656e742d69642d67656e657261746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cskiller/filament-id-generator)[![GitHub Tests Action Status](https://camo.githubusercontent.com/0406184a9d8199246462af169c59cbb801bd55112b2e79414bb555684a6e5a7f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f63736b696c6c65722f66696c616d656e742d69642d67656e657261746f722f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/cskiller/filament-id-generator/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/d4543e6fdd89d13f7f6906cb512810b95be52e5990ba1da552793f0095742e5f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f63736b696c6c65722f66696c616d656e742d69642d67656e657261746f722f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/cskiller/filament-id-generator/actions?query=workflow%3A%22Fix+PHP+code+styling%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/3945b625a1afc7e1b8dc6dec5ae77de2587bb272e4b0f91807fb58c71f9eb7b9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f63736b696c6c65722f66696c616d656e742d69642d67656e657261746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cskiller/filament-id-generator)

A Filament 5 plugin for bulk ID card generation with a visual canvas-based template editor. Design front and back card layouts in the browser, map fields to any Elo quent model, and generate hundreds of ID cards (PNG + PDF) in the background via Laravel queues.

Features
--------

[](#features)

- **Visual template editor** — drag-and-drop canvas (Konva.js) to position text and image fields on front/back sides
- **Any data source** — bring your own Eloquent model (students, employees, members) through a typed adapter interface
- **Queue-based batch rendering** — renders each card in a separate queued job; a final job zips all outputs when done
- **High-resolution output** — Intervention Image + Imagick at configurable DPI; front + back composited into one PDF per card
- **PDF template support** — upload a PDF template and it is automatically rasterized to a preview image
- **Fully headless** — disable either Filament resource and drive generation through the Action classes directly

---

Table of Contents
-----------------

[](#table-of-contents)

1. [Requirements](#requirements)
2. [Installation](#installation)
3. [Quick Start](#quick-start)
4. [Creating an Adapter](#creating-an-adapter)
5. [Registering the Plugin](#registering-the-plugin)
6. [Configuration Reference](#configuration-reference)
7. [Plugin Fluent API](#plugin-fluent-api)
8. [Storage Disks](#storage-disks)
9. [How Templates Work](#how-templates-work)
10. [How Batch Generation Works](#how-batch-generation-works)
11. [Rendering Pipeline](#rendering-pipeline)
12. [Editor Routes](#editor-routes)
13. [Advanced Usage](#advanced-usage)
14. [Testing](#testing)
15. [Contributing](#contributing)
16. [Credits](#credits)
17. [License](#license)

---

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

[](#requirements)

DependencyVersionPHP^8.3Laravel^13.0Filament^5.0PHP Imagick extensionanyGhostscriptany (only for PDF template uploads)> **Imagick** must be enabled in your `php.ini`. **Ghostscript** is only required if you plan to upload PDF files as template backgrounds.

---

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

[](#installation)

### 1. Require the package

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

```
composer require cskiller/filament-id-generator
```

### 2. Run the install command

[](#2-run-the-install-command)

The package ships an interactive installer that publishes the config, migrations, and optionally runs them:

```
php artisan filament-id-generator:install
```

Or do it manually:

```
php artisan vendor:publish --tag="filament-id-generator-config"
php artisan vendor:publish --tag="filament-id-generator-migrations"
php artisan migrate
```

### 3. Configure the queue

[](#3-configure-the-queue)

Batch rendering uses Laravel's job batching feature. Make sure `QUEUE_CONNECTION` in `.env` is **not** `sync` for production use, and that the required tables exist:

```
php artisan queue:batches-table
php artisan queue:table   # only if using the database queue driver
php artisan migrate
```

---

Quick Start
-----------

[](#quick-start)

**1.** Create an adapter for the model you want to generate IDs from (see [Creating an Adapter](#creating-an-adapter)).

**2.** Register the plugin in your Filament panel provider:

```
// app/Providers/Filament/AdminPanelProvider.php

use App\Support\Adapters\UserIdDataSourceAdapter;
use Cskiller\FilamentIdGenerator\FilamentIdGeneratorPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        // ... your existing panel config
        ->plugin(
            FilamentIdGeneratorPlugin::make()
                ->adapters([
                    'user' => UserIdDataSourceAdapter::class,
                ])
        );
}
```

**3.** Log in to your Filament panel. You will find **ID Templates** and **ID Generation Batches** under the *ID Generator* navigation group.

**4.** Create a template, upload front/back card images, open the editor to position fields, then hit **Generate** on the template edit page.

---

Creating an Adapter
-------------------

[](#creating-an-adapter)

An adapter connects the plugin to your Eloquent data source (e.g. `User`, `Student`, `Employee`). Implement the `IdDataSourceAdapter` contract:

```
