Drafts
This plugin adds the ability to manage your model's drafts and revisions in your filament resources.
Author:
Guava
Documentation

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.
#Installation
You can install the package with composer:
composer require guava/filament-drafts
#Usage
#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
Add the Draftable trait to your Resource:
use Guava\FilamentDrafts\Admin\Resources\Concerns\Draftable;
class PostResource extends Resource
{
use Draftable;
}
#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
use Guava\FilamentDrafts\Admin\Resources\Pages\Create\Draftable;
class CreatePost extends CreateRecord
{
use Draftable;
}
#Edit Page
use Guava\FilamentDrafts\Admin\Resources\Pages\Edit\Draftable;
class EditPost extends EditRecord
{
use Draftable;
}
#List Page
use Guava\FilamentDrafts\Admin\Resources\Pages\List\Draftable;
class ListPosts extends ListRecords
{
use Draftable;
}
#Changelog
Please see CHANGELOG for more information on what has changed recently.
#Contributing
Please see CONTRIBUTING for details.
#Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
#Credits
#License
The MIT License (MIT). Please see License File for more information.
#Other packages
The author
From the same author
Icons
Install and use any blade icon pack and generate enum classes for any icon sets.
Author:
Guava
Nested Resources
Adds support for nested resources
Author:
Guava
Knowledge Base
Adds a knowledge-base panel, a place for all your documentation right inside your app.
Author:
Guava
Clusters
Plugin that allows you to visually cluster multiple fields together.
Author:
Guava
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
Custom Fields
Eliminate custom field migrations forever. Let your users create and manage form fields directly in Filament admin panels with 20+ built-in field types, validation, and zero database changes.
Relaticle
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