PHPackages                             pawelmysior/laravel-publishable - 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. pawelmysior/laravel-publishable

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

pawelmysior/laravel-publishable
===============================

Toggle the published state of your Eloquent models easily

5.0.0(1y ago)2219.1k↓25%11[4 issues](https://github.com/jaymeh/laravel-publishable/issues)3MITPHPPHP ^8.2CI passing

Since Jul 30Pushed 1y ago1 watchersCompare

[ Source](https://github.com/jaymeh/laravel-publishable)[ Packagist](https://packagist.org/packages/pawelmysior/laravel-publishable)[ RSS](/packages/pawelmysior-laravel-publishable/feed)WikiDiscussions 5.x Synced 1mo ago

READMEChangelog (6)Dependencies (5)Versions (19)Used By (3)

Publishable
===========

[](#publishable)

Toggle the published state of your Eloquent models easily.

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

[](#installation)

You can install the package via composer:

```
composer require pawelmysior/laravel-publishable
```

Versions
--------

[](#versions)

For details about which version of this package to use with your Laravel version please see the table below:

Laravel VersionPackage Version&lt;9.x1.x9.x2.x10.x3.x11.x4.x12.x5.xPreparation
-----------

[](#preparation)

To start you need to add a `published_at` nullable timestamp column to your table.

Put this in your table migration:

```
$table->timestamp('published_at')->nullable();
```

Now use the trait on the model

```
