PHPackages                             mradang/laravel-log - 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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. mradang/laravel-log

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

mradang/laravel-log
===================

laravel-log

v1.5.0(1mo ago)0540MITPHP

Since Nov 22Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/mradang/laravel-log)[ Packagist](https://packagist.org/packages/mradang/laravel-log)[ RSS](/packages/mradang-laravel-log/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (5)Dependencies (6)Versions (6)Used By (0)

安装
--

[](#安装)

```
$ composer require mradang/laravel-log -vvv
```

配置
--

[](#配置)

1. 刷新数据库迁移

```
php artisan migrate:refresh
```

2. 手动添加日志迁移到文件的任务

修改 laravel 工程 app\\Console\\Kernel.php 文件，在 schedule 函数中增加

```
// 迁移日志到文件
$schedule
    ->call(function () {
        try {
            \mradang\LaravelLog\Services\LogService::migrateToFile();
        } catch (\Exception $e) {
            logger()->warning(sprintf('Kernel.schedule 迁移日志到文件失败：%s', $e->getMessage()));
        }
    })
    ->cron('0 0 2 * *')
    ->name('LogService::migrateToFile')
    ->withoutOverlapping();
```

添加的内容
-----

[](#添加的内容)

### 添加的数据表迁移

[](#添加的数据表迁移)

- logs

### 添加的路由

[](#添加的路由)

- post /api/log/lists

### 添加的助手函数

[](#添加的助手函数)

1. 数据库日志，用于记录用户操作

```
void L($msg, $username = null)
```

### 配置路由

[](#配置路由)

laravel-log 未自动配置路由，方便使用者自定义路由及权限控制

```
Route::post('lists', [mradang\LaravelLog\Controllers\LogController::class, 'lists']);
```

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance94

Actively maintained with recent releases

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

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

Every ~491 days

Total

5

Last Release

31d ago

### Community

Maintainers

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

---

Top Contributors

[![mradang](https://avatars.githubusercontent.com/u/1206671?v=4)](https://github.com/mradang "mradang (12 commits)")

###  Code Quality

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/mradang-laravel-log/health.svg)

```
[![Health](https://phpackages.com/badges/mradang-laravel-log/health.svg)](https://phpackages.com/packages/mradang-laravel-log)
```

###  Alternatives

[overtrue/laravel-query-logger

A dev tool to log all queries for laravel application.

413307.5k6](/packages/overtrue-laravel-query-logger)[guanguans/laravel-exception-notify

Monitor exception and report to the notification channels(Log、Mail、AnPush、Bark、Chanify、DingTalk、Discord、Gitter、GoogleChat、IGot、Lark、Mattermost、MicrosoftTeams、NowPush、Ntfy、Push、Pushback、PushBullet、PushDeer、PushMe、Pushover、PushPlus、QQ、RocketChat、ServerChan、ShowdocPush、SimplePush、Slack、Telegram、WeWork、WPush、XiZhi、YiFengChuanHua、ZohoCliq、ZohoCliqWebHook、Zulip).

14642.7k1](/packages/guanguans-laravel-exception-notify)[regulus/activity-log

A clean and simple Laravel 5 activity logger for monitoring user activity on a website or web application.

164220.1k2](/packages/regulus-activity-log)

PHPackages © 2026

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