PHPackages                             aw3r1se/laravel-audit-moonshine - 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. [Admin Panels](/categories/admin)
4. /
5. aw3r1se/laravel-audit-moonshine

ActiveLibrary[Admin Panels](/categories/admin)

aw3r1se/laravel-audit-moonshine
===============================

MoonShine admin-panel bridge for aw3r1se/laravel-audit-core

v1.0.0(1mo ago)020↓35%MITPHPPHP ^8.3

Since Jun 4Pushed 1mo agoCompare

[ Source](https://github.com/aw3r1se/laravel-audit-moonshine)[ Packagist](https://packagist.org/packages/aw3r1se/laravel-audit-moonshine)[ Docs](https://github.com/aw3r1se/laravel-audit-moonshine)[ RSS](/packages/aw3r1se-laravel-audit-moonshine/feed)WikiDiscussions master Synced 1w ago

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

laravel-audit-moonshine
=======================

[](#laravel-audit-moonshine)

MoonShine admin-panel bridge for [`aw3r1se/laravel-audit-core`](../laravel-audit-core). Reuses the same recording engine so actions performed through the MoonShine admin panel land in the same audit stream as your API.

Why a separate middleware
-------------------------

[](#why-a-separate-middleware)

MoonShine fires many mutating requests that change nothing, and its env-based single-admin auth has no database user id. `AuditMoonShineActions` therefore:

- dispatches **only when the model layer actually recorded a change**, and
- stamps a configurable admin actor id (`null` by default) instead of the request user.

Everything else — what gets recorded, how it is delivered — is inherited from the core package and its transport.

Install
-------

[](#install)

```
composer require aw3r1se/laravel-audit-moonshine
```

This bridge ships **no config file of its own**. Its single setting is merged at runtime into the core package's `audit` config under the `moonshine` key, so the only config you ever publish is `config/audit.php` from the core package.

Usage
-----

[](#usage)

Register the middleware in your MoonShine config so it wraps every admin request:

```
// config/moonshine.php
'middleware' => [
    // ...MoonShine defaults...
    \Aw3r1se\Audit\MoonShine\Http\Middleware\AuditMoonShineActions::class,
],
```

Make the MoonShine-managed models auditable exactly as in the core package (`implements Auditable` + `use InteractsWithAudit`).

Distinguish admin actions on the read side by their route name (`moonshine.crud.*`, `moonshine.update-field.*`), and substitute an admin display name for the null actor there.

Configuration
-------------

[](#configuration)

The actor id lives under the `audit.moonshine` namespace. Set it with the `AUDIT_MOONSHINE_ACTOR_ID` env var, or add a `moonshine` block to the published `config/audit.php`:

```
// config/audit.php
'moonshine' => [
    'actor_id' => env('AUDIT_MOONSHINE_ACTOR_ID'),
],
```

keydefaultpurpose`audit.moonshine.actor_id``null`user id stamped on actions made through the admin panelTesting
-------

[](#testing)

```
composer install
composer test
```

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance90

Actively maintained with recent releases

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

50d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e6ea307b87fb93d67f2da48db1a86aa97f0a3a55f96d7e6ffd664355ab7fea04?d=identicon)[aw3r1se](/maintainers/aw3r1se)

---

Top Contributors

[![aw3r1se](https://avatars.githubusercontent.com/u/80489373?v=4)](https://github.com/aw3r1se "aw3r1se (2 commits)")

---

Tags

laravelAuditadminmoonshine

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/aw3r1se-laravel-audit-moonshine/health.svg)

```
[![Health](https://phpackages.com/badges/aw3r1se-laravel-audit-moonshine/health.svg)](https://phpackages.com/packages/aw3r1se-laravel-audit-moonshine)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.3M347](/packages/psalm-plugin-laravel)[api-platform/laravel

API Platform support for Laravel

58174.6k17](/packages/api-platform-laravel)[slowlyo/owl-admin

基于 laravel、amis 开发的后台框架~

61315.0k26](/packages/slowlyo-owl-admin)

PHPackages © 2026

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