PHPackages                             neuecommerce/visible-records - 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. neuecommerce/visible-records

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

neuecommerce/visible-records
============================

Handle visibility state on your Laravel Eloquent model records.

1326PHP

Since Mar 22Pushed 2y ago1 watchersCompare

[ Source](https://github.com/neuecommerce/visible-records)[ Packagist](https://packagist.org/packages/neuecommerce/visible-records)[ RSS](/packages/neuecommerce-visible-records/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Visible Records for Laravel
===========================

[](#visible-records-for-laravel)

[![GitHub Tests Action Status](https://github.com/neuecommerce/visible-records/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/neuecommerce/visible-records/actions?query=workflow%3Atests)[![GitHub Code Analysis Action Status](https://github.com/neuecommerce/visible-records/actions/workflows/code-analysis.yml/badge.svg?branch=main)](https://github.com/neuecommerce/visible-records/actions?query=workflow%3Acode-analysis)[![Software License](https://camo.githubusercontent.com/a603e2d11c62e1e5ef033aab74518a1ee0273cb33a1c15464aa04b3a567cf92b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6e657565636f6d6d657263652f76697369626c652d7265636f7264733f6c6162656c3d4c6963656e7365)](https://opensource.org/licenses/MIT)[![Latest Version on Packagist](https://camo.githubusercontent.com/27cb7626fd7a17e4bf63fcdcb08c5d34b180bae85a8c7b097375f9b7fc3b624c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e657565636f6d6d657263652f76697369626c652d7265636f7264732e7376673f6c6162656c3d5061636b6167697374)](https://github.com/neuecommerce/neuecommerce)[![Total Downloads](https://camo.githubusercontent.com/dbcef26db2fc44f9405758e401fba62b70d6d12cb8553f4194e6b42d9ceadd5f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6e657565636f6d6d657263652f76697369626c652d7265636f7264732e7376673f6c6162656c3d446f776e6c6f616473)](https://github.com/neuecommerce/neuecommerce)

An Activity Logger for Laravel Eloquent models.

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

[](#installation)

1. Install the package via Composer:

```
composer require neuecommerce/visible-records
```

Implementation
--------------

[](#implementation)

### Automatic

[](#automatic)

Implementing the Visible Records package on your Eloquent models, is quite simple and can be done in 3 just simple steps:

1. Implement the `NeueCommerce\VisibleRecords\HasVisibilityInterface` interface on your model(s).
2. Implement the `NeueCommerce\VisibleRecords\HasVisibility` trait on your model(s).
3. Create a database migration that adds the `visibile_at` nullable timestamp column to your model(s) table.

Here's an example of a model with the proper implementation:

```
