PHPackages                             guava/filament-drafts - 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. guava/filament-drafts

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

guava/filament-drafts
=====================

A filament plugin that adds the ability to manage drafts and revisions of your models.

2.1.1(2y ago)7517.0k↓76.5%19[9 issues](https://github.com/GuavaCZ/filament-drafts/issues)[1 PRs](https://github.com/GuavaCZ/filament-drafts/pulls)1MITPHP

Since Apr 10Pushed 2y ago3 watchersCompare

[ Source](https://github.com/GuavaCZ/filament-drafts)[ Packagist](https://packagist.org/packages/guava/filament-drafts)[ GitHub Sponsors](https://github.com/LukasFreyCZ)[ RSS](/packages/guava-filament-drafts/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (9)Dependencies (3)Versions (11)Used By (1)

[![filament_drafts](https://user-images.githubusercontent.com/10926334/230881634-3fefdbe4-4301-48f3-8a8f-25b214a88c26.png)](https://user-images.githubusercontent.com/10926334/230881634-3fefdbe4-4301-48f3-8a8f-25b214a88c26.png)

Filament Drafts
===============

[](#filament-drafts)

[![Latest Version on Packagist](https://camo.githubusercontent.com/ac9b3041ad46b50c9e88da8c2096e798c87f5cd2371ed4b4ead7d1d166e13236/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f67756176612f66696c616d656e742d6472616674732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/guava/filament-drafts)[![Packagist PHP Version](https://camo.githubusercontent.com/ff96b730f8985e2b66502ee19712c9be5d9097986812d994216e656d9fea55bc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f67756176612f66696c616d656e742d6472616674732f7068703f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/ff96b730f8985e2b66502ee19712c9be5d9097986812d994216e656d9fea55bc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f67756176612f66696c616d656e742d6472616674732f7068703f7374796c653d666c61742d737175617265)[![Total Downloads](https://camo.githubusercontent.com/8eb017b766b7689171a3cc43afbf0a30dbd4f3f699e1c042e40c82e53dd0b8fb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f67756176612f66696c616d656e742d6472616674732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/guava/filament-drafts)

This plugin adds the ability to manage your model's drafts and revisions in your filament resources.

It's a filament implementation for [Laravel Drafts](https://github.com/oddvalue/laravel-drafts).

    drafts-preview.mov    Installation
------------

[](#installation)

You can install the package with composer:

```
  composer require guava/filament-drafts
```

Usage
-----

[](#usage)

### Model Trait

[](#model-trait)

First make sure that you have correctly set-up a model to use drafts from Laravel Drafts.

At the very least you need to add the HasDrafts (please note this is a modified trait) trait to your model:

```
use Guava\FilamentDrafts\Concerns\HasDrafts;

class Post extends Model
{
    use HasDrafts;
}
```

and modify your migration:

```
return new class extends Migration
{
    public function up(): void
    {
        Schema::create('posts', function (Blueprint $table) {
            //...
            $table->drafts();
        };
    }
}
```

NOTE: If you use the HasDrafts trait from Laravel Drafts, make sure you have defined `is_published` in your $fillable properties.

After that, all you need to do is add a few traits to your resource and resource pages:

### Resource Trait

[](#resource-trait)

Add the `Draftable` trait to your Resource:

```
use Guava\FilamentDrafts\Admin\Resources\Concerns\Draftable;

class PostResource extends Resource
{
    use Draftable;
}
```

### Resource Pages

[](#resource-pages)

Add the respective `Draftable` trait to your Resource Pages: (Keep in mind that each page uses a different trait from another namespace)

#### Create Page

[](#create-page)

```
use Guava\FilamentDrafts\Admin\Resources\Pages\Create\Draftable;

class CreatePost extends CreateRecord
{
    use Draftable;
}
```

#### Edit Page

[](#edit-page)

```
use Guava\FilamentDrafts\Admin\Resources\Pages\Edit\Draftable;

class EditPost extends EditRecord
{
    use Draftable;
}
```

#### List Page

[](#list-page)

```
use Guava\FilamentDrafts\Admin\Resources\Pages\List\Draftable;

class ListPosts extends ListRecords
{
    use Draftable;
}
```

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.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Guava](https://github.com/GuavaCZ)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

Other packages
--------------

[](#other-packages)

- [Laravel Populator](https://github.com/GuavaCZ/laravel-populator)
- [Filament Icon Picker](https://github.com/LukasFreyCZ/filament-icon-picker)

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity43

Moderate usage in the ecosystem

Community20

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 54.5% of commits — single point of failure

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 ~21 days

Recently: every ~41 days

Total

9

Last Release

998d ago

Major Versions

1.2.0 → 2.0.02023-07-31

### Community

Maintainers

![](https://www.gravatar.com/avatar/42d872f5f47cd71cfd46c8fbd6ec77a6bfb46d6d9499b5e1f843eb407c07f737?d=identicon)[Skrypt](/maintainers/Skrypt)

---

Top Contributors

[![lukas-frey](https://avatars.githubusercontent.com/u/10926334?v=4)](https://github.com/lukas-frey "lukas-frey (18 commits)")[![mansoorkhan96](https://avatars.githubusercontent.com/u/51432274?v=4)](https://github.com/mansoorkhan96 "mansoorkhan96 (8 commits)")[![RibesAlexandre](https://avatars.githubusercontent.com/u/818564?v=4)](https://github.com/RibesAlexandre "RibesAlexandre (6 commits)")[![albertobenavides](https://avatars.githubusercontent.com/u/9291085?v=4)](https://github.com/albertobenavides "albertobenavides (1 commits)")

### Embed Badge

![Health badge](/badges/guava-filament-drafts/health.svg)

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

###  Alternatives

[stephenjude/filament-feature-flags

Filament implementation of feature flags and segmentation with Laravel Pennant.

122157.7k1](/packages/stephenjude-filament-feature-flags)[dotswan/filament-map-picker

Easily pick and retrieve geo-coordinates using a map-based interface in your Filament applications.

128173.7k3](/packages/dotswan-filament-map-picker)[creagia/filament-code-field

A Filamentphp input field to edit or view code data.

57301.3k3](/packages/creagia-filament-code-field)[stephenjude/filament-blog

Filament Blog Builder

20518.8k](/packages/stephenjude-filament-blog)[crumbls/layup

A visual page builder plugin for Filament 5 — Divi-style grid layouts with extensible widgets.

591.7k1](/packages/crumbls-layup)[eduardoribeirodev/filament-leaflet

Um widget de mapa para FilamentPHP.

1912.2k](/packages/eduardoribeirodev-filament-leaflet)

PHPackages © 2026

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