承接 jackjoe/activity-log 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

jackjoe/activity-log

Composer 安装命令:

composer require jackjoe/activity-log

包简介

A clean and simple Laravel 5 activity logger for logging website / application actions.

README 文档

README

Latest Version on Packagist Build Status Scrutinizer Code Quality Total Downloads

Installation

Basic installation, service provider registration, and aliasing:

Installation is done with composer, so add the package to yourcomposer.json file:

"require": {
	"jackjoe/activity-log": "0.3.*"
},

Then run composer update

Laravel 5.5+

Laravel 5.5 has auto discovery, you are done. If not see below.

<= Laravel 5.4

Register the service provider and alias in app/config/app.php. Add the following to the providers array:

JackJoe\ActivityLog\ActivityLogServiceProvider::class,

And add this to the aliases array:

'Activity' => JackJoe\ActivityLog\Models\Activity::class,

Publishing migrations and configuration:

To publish this package's configuration, run this from the command line:

php artisan vendor:publish --provider="JackJoe\ActivityLog\ActivityLogServiceProvider"

Note: Migrations are only published; remember to run them when ready.

To run migration to create ActivityLog's table, run this from the command line:

php artisan migrate

Basic Usage

Logging user activity:

Activity::log([
  'contentId'   => $user->id,
  'content' => 'User',
  'action'      => 'ACTION',
  'state'       => 'SUCCESS',
  'details'     => 'Username: ' . $user->username,
  'data'        => json_encode($data)
]);

The above code will log an activity for the currently logged in user. The IP address will automatically be saved as well.

Variable guidelines

  • content: type of content we are dealing with, can be set to match PHP class, controller, model, ... It gives us more context where this action has taken place.
  • contentId (option): id of content, in case of a model
  • action: method name, sub-action in method, ..
  • state: state of action such as ERROR, SUCCESS, WRONG_CODE, ...
  • details: more like meta date about current state
  • data: raw data, fetched content, posted content, ...

Contributing

Please see CONTRIBUTING for details.

Credits

Based on Regulus/ActivityLog.

License

The MIT License (MIT). Please see License File for more information.

jackjoe/activity-log 适用场景与选型建议

jackjoe/activity-log 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.07k 次下载、GitHub Stars 达 4, 最近一次更新时间为 2017 年 03 月 20 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「log」 「user」 「laravel」 「activity」 「jackjoe」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 jackjoe/activity-log 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 jackjoe/activity-log 我们能提供哪些服务?
定制开发 / 二次开发

基于 jackjoe/activity-log 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 1.07k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 10
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 3
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-03-20