PHPackages                             andheiberg/readable - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. andheiberg/readable

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

andheiberg/readable
===================

Make eloquent models readable

1.0.2(12y ago)4363[1 PRs](https://github.com/AndreasHeiberg/laravel-readable/pulls)PHP

Since Feb 13Pushed 5y ago1 watchersCompare

[ Source](https://github.com/AndreasHeiberg/laravel-readable)[ Packagist](https://packagist.org/packages/andheiberg/readable)[ RSS](/packages/andheiberg-readable/feed)WikiDiscussions master Synced 3d ago

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

\#Laravel Readable Make eloquent models readable

Introduction
------------

[](#introduction)

For cases where you would like multiple users to be able to mark something as read. In somecases a read\_at collumn can easily be added to a reasource table in order to store similar information, this package is for cases where this is not practical.

\##Overview A reads table is created to keep track of read resources.

\##Installation

- Add `"andheiberg/readable": "dev-master"` to your composer.json
- Run `composer update`
- Run `php artisan migrate --package="andheiberg/readable"`
- Add `use \Andheiberg\Readable\Traits\IsReadable;` inside every model you want to be readable

Usage
-----

[](#usage)

Congratulations! Now you can use read resources.

### Examples

[](#examples)

Now you can use it like a pro.

```
    /**
     * Mark a resource as read
     *
     * @var void
     */
    public function markAsRead()

    /**
     * Mark a resource as unread
     *
     * @var void
     */
    public function markAsUnread()

    /**
     * Limit query to read resources
     *
     * @var void
     */
    public function scopeRead($query, $user_id = null)

    /**
     * Limit query to unread resources
     *
     * @var void
     */
    public function scopeUnread($query, $user_id = null)
```

```
    Post::find(1)->markAsRead();
```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity66

Established project with proven stability

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

4

Last Release

4474d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/207626c3611f7c70c59a8164259c22cb1233b0a8e009d1feae3e45c9351d4c4c?d=identicon)[AndreasHeiberg](/maintainers/AndreasHeiberg)

### Embed Badge

![Health badge](/badges/andheiberg-readable/health.svg)

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

###  Alternatives

[interaction-design-foundation/laravel-geoip

Support for multiple Geographical Location services.

17221.0k3](/packages/interaction-design-foundation-laravel-geoip)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

116.6k](/packages/tomshaw-electricgrid)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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