PHPackages                             shetabit/stampable - 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. shetabit/stampable

ActiveLibrary

shetabit/stampable
==================

Add stamp behaviors into laravel models.

v1.0.1(6y ago)66MITPHPPHP &gt;=7.1

Since Jun 14Pushed 6y ago2 watchersCompare

[ Source](https://github.com/shetabit/stampable)[ Packagist](https://packagist.org/packages/shetabit/stampable)[ Docs](https://github.com/shetabit/stampable)[ RSS](/packages/shetabit-stampable/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (2)Dependencies (4)Versions (3)Used By (0)

[![](resources/images/stamp.jpg?raw=true)](resources/images/stamp.jpg?raw=true)

Laravel Stampable
=================

[](#laravel-stampable)

[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Latest Version on Packagist](https://camo.githubusercontent.com/e0ebc62da75ba698838a54c523472500defeeb44ad67f8a6bcfa50e8c9df7d1c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73686574616269742f7374616d7061626c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/shetabit/stampable)[![StyleCI](https://camo.githubusercontent.com/a041703a24e0fd46c399181e9f71dd656310229d88f0b2af7faa5d815f2787a7/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3139313832343539362f736869656c643f6272616e63683d6d6173746572)](https://github.styleci.io/repos/191824596)[![Maintainability](https://camo.githubusercontent.com/db454fba258cbdcfd594a3a0e7e849ba7844d11ac19dc083770ddb5756b71a30/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f65366138306231373239386362346663623536642f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/shetabit/stampable/maintainability)[![Quality Score](https://camo.githubusercontent.com/62b1b642d1d4539badfefd2932b9767a4c488b5d0fe1476f7d2b44a8c00c9124/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f73686574616269742f7374616d7061626c652e7376673f6c6162656c3d436f64652532305175616c697479267374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/shetabit/stampable)

This is a Laravel Package for adding stamp behaviors into laravel models. This package supports `Laravel 5.2+`.

List of contents
================

[](#list-of-contents)

- [Install](#install)
- [How to use](#how-to-use)
    - [Configure migration](#configure-migration)
    - [Configure Model](#configure-model)
    - [Define stamps](#define-stamps)
    - [Working with stamps](#working-with-stamps)
- [Change log](#change-log)
- [Contributing](#contributing)
- [Security](#security)
- [Credits](#credits)
- [License](#license)

Install
-------

[](#install)

Via Composer

```
$ composer require shetabit/stampable
```

How to use
==========

[](#how-to-use)

Configure Migration
-------------------

[](#configure-migration)

In your migration you must add `timestamp` field per each stamp.

```
// In migration, you must add published_at field like the below if you want to use it as a stamp.
$table->timestamp('published_at')->nullable();
```

Configure Model
---------------

[](#configure-model)

In your eloquent model add use `HasStamps` trait like the below.

```
