PHPackages                             glaivepro/drafterer - 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. [Database &amp; ORM](/categories/database)
4. /
5. glaivepro/drafterer

AbandonedArchivedLibrary[Database &amp; ORM](/categories/database)

glaivepro/drafterer
===================

Drafting upcoming versions for Eloquent models

0.1.2(8y ago)39MITPHPPHP ~7.1

Since Jun 26Pushed 7y ago1 watchersCompare

[ Source](https://github.com/GlaivePro/Drafterer)[ Packagist](https://packagist.org/packages/glaivepro/drafterer)[ Docs](https://github.com/GlaivePro/Drafterer)[ RSS](/packages/glaivepro-drafterer/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (1)Dependencies (4)Versions (4)Used By (0)

Drafterer
=========

[](#drafterer)

> The development of this package is a bit postponed for now because of lack of time.

Drafterer is a Laravel package that allows you to save a draft version of an Eloquent model. It can be used for previewing upcoming changes before commiting them. Also useful for autosaved version.

Install
-------

[](#install)

Via Composer.

```
$ composer require glaivepro/drafterer
```

Afterwards you should migrate the table for drafts. Just do it.

```
$ php artisan migrate
```

Usage
-----

[](#usage)

Make your model draftable.

```
use Illuminate\Database\Eloquent\Model;
use GlaivePro\Drafterer\Draftable;

class Article extends Model
{
    use Draftable;
	//
}
```

Save changes as a draft instead of the model itself.

```
$article = Article::find(1);
$article->title = 'Real title';
$article->intro = 'Real introduction';
$article->save();

$article->title = 'Draft title';
$article->drafterer->save();
```

Use the real or drafted article.

```
$article = Article::find(1);

$article->title;  // returns 'Real title'

$article->drafterer->title; // returns 'Draft title'
$article->drafterer->intro; // returns 'Real introduction'
```

You might want to decide to use the draft as the real version - just write it down then.

```
$article->drafterer->write();
```

Or you might discard it.

```
$article->drafterer->discard();
```

For draft-only users or conditionals we can also replace the attributes with the drafted ones.

```
$article->title;  // returns 'Real title'

$article->drafterer->load();

$article->title;  // returns 'Draft title'
```

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

License
-------

[](#license)

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

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

3

Last Release

2926d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/16481303?v=4)[Džuris](/maintainers/tontonsb)[@tontonsb](https://github.com/tontonsb)

---

Top Contributors

[![tontonsb](https://avatars.githubusercontent.com/u/16481303?v=4)](https://github.com/tontonsb "tontonsb (5 commits)")

---

Tags

laraveleloquent

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/glaivepro-drafterer/health.svg)

```
[![Health](https://phpackages.com/badges/glaivepro-drafterer/health.svg)](https://phpackages.com/packages/glaivepro-drafterer)
```

###  Alternatives

[kirschbaum-development/eloquent-power-joins

The Laravel magic applied to joins.

1.6k29.9M42](/packages/kirschbaum-development-eloquent-power-joins)[mongodb/laravel-mongodb

A MongoDB based Eloquent model and Query builder for Laravel

7.1k8.0M90](/packages/mongodb-laravel-mongodb)[spatie/laravel-sluggable

Generate slugs when saving Eloquent models

1.5k12.4M294](/packages/spatie-laravel-sluggable)[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[watson/validating

Eloquent model validating trait.

9733.4M53](/packages/watson-validating)[yajra/laravel-oci8

Oracle DB driver for Laravel via OCI8

8723.1M23](/packages/yajra-laravel-oci8)

PHPackages © 2026

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