PHPackages                             niclasleonbock/eloquent-activatable - 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. niclasleonbock/eloquent-activatable

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

niclasleonbock/eloquent-activatable
===================================

Creating (de-) activatable Eloquent Models made easy.

v5.4(8y ago)82081[1 PRs](https://github.com/niclasleonbock/eloquent-activatable/pulls)MITPHPPHP &gt;=5.6.0

Since Feb 28Pushed 7y ago1 watchersCompare

[ Source](https://github.com/niclasleonbock/eloquent-activatable)[ Packagist](https://packagist.org/packages/niclasleonbock/eloquent-activatable)[ RSS](/packages/niclasleonbock-eloquent-activatable/feed)WikiDiscussions master Synced today

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

Eloquent Activatable
====================

[](#eloquent-activatable)

Creating (de-) activatable Eloquent Models made easy.

[![Build Status](https://camo.githubusercontent.com/6cf949dddbcdf1967da1b893ff69a466b2f088ddec36122f3b8128ece9e8a265/68747470733a2f2f7472617669732d63692e6f72672f6e69636c61736c656f6e626f636b2f656c6f7175656e742d6163746976617461626c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/niclasleonbock/eloquent-activatable) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/ca9d0e25e2f2df41bd90c3efe16ece16ef95b2f8c0c2f81cbf9638f15734308d/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6e69636c61736c656f6e626f636b2f656c6f7175656e742d6163746976617461626c652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/niclasleonbock/eloquent-activatable/?branch=master) [![Code Coverage](https://camo.githubusercontent.com/437a960d11262ff0822f934eff98adc97525ce0cd5418c3ffba2832261fd4f2b/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6e69636c61736c656f6e626f636b2f656c6f7175656e742d6163746976617461626c652f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/niclasleonbock/eloquent-activatable/?branch=master)

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

[](#installation)

First, you'll need to add the package to your `composer.json` and run `composer update`.

```
{
    "require": {
        "niclasleonbock/eloquent-activatable": "~5.0"
    }
}
```

> Please require version 4.0 when using with Laravel 4.x.

Now, simply add a datetime column called `activated_at` to your table and use the `ActivatableTrait` (`niclasleonbock\Eloquent\ActivatableTrait`) in your Eloquent model.

### Migration

[](#migration)

```
