PHPackages                             topix-hackademy/loggable-models - 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. topix-hackademy/loggable-models

ActiveLibrary

topix-hackademy/loggable-models
===============================

 A package to add log on models so that can be retrieved anytime

v0.1.1(8y ago)076MITPHP

Since Jul 27Pushed 8y ago1 watchersCompare

[ Source](https://github.com/topix-hackademy/loggable-models)[ Packagist](https://packagist.org/packages/topix-hackademy/loggable-models)[ RSS](/packages/topix-hackademy-loggable-models/feed)WikiDiscussions master Synced today

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

Loggable Models
===============

[](#loggable-models)

This package provide a easy way to add a log for a Eloquent entity.

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

[](#installation)

`composer require topix-hackademy/loggable-models`

in config/app.php

```
'providers' => [
    ..
    Topix\Hackademy\LoggableModels\Laravel\ServiceProvider::class,
    ..
     ]

```

then launch

```
php artisan vendor:publish

```

everything is ready.

Usage
-----

[](#usage)

Set the model you want to log like this

```
class Post extends Eloquent implements ModelLogInterface
{
    use ModelLogTrait;

}

```

Now on an instance of that model you can use any log method in the logger interface

```
$post->alert($message);

public function emergency($message, array $context = array());
public function alert($message, array $context = array());
public function critical($message, array $context = array());
public function error($message, array $context = array());
public function warning($message, array $context = array());
public function notice($message, array $context = array());
public function info($message, array $context = array());
public function debug($message, array $context = array());

```

to retrieve the logs you can use the plural form of those methods as get:

```
$post->alerts()

```

as well as there are the scopes for easy quering the database for every level.

```
scopeHasEmergencies()
...

Post::hasEmergencies()->get()

```

###  Health Score

27

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 89.5% of commits — single point of failure

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 ~52 days

Recently: every ~116 days

Total

10

Last Release

3055d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8ff3e29671b401caf778945b7e97e41d270dcf7745088bde3a53eccf7e3e6fae?d=identicon)[gab88slash](/maintainers/gab88slash)

---

Top Contributors

[![ilmeskio](https://avatars.githubusercontent.com/u/4226595?v=4)](https://github.com/ilmeskio "ilmeskio (17 commits)")[![rivoduck](https://avatars.githubusercontent.com/u/7510956?v=4)](https://github.com/rivoduck "rivoduck (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/topix-hackademy-loggable-models/health.svg)

```
[![Health](https://phpackages.com/badges/topix-hackademy-loggable-models/health.svg)](https://phpackages.com/packages/topix-hackademy-loggable-models)
```

PHPackages © 2026

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