承接 chaseconey/laravel-activity 相关项目开发

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

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

chaseconey/laravel-activity

最新稳定版本:1.0.0

Composer 安装命令:

composer require chaseconey/laravel-activity

包简介

A simple Laravel model activity recording mechanism

README 文档

README

StyleCI Latest Stable Version Total Downloads Latest Unstable Version License

A very simple activity logger build specifically for laravel that tracks actions performed by users based on model events.

Inspired by a Laracasts Lesson

Quikstart

  1. Add package to composer.json
"require": {
    "laravel/framework": "5.0.*",
    "chaseconey/laravel-activity": "dev-master"
  }
  1. Add Service Provider to app.php config
'Chaseconey\ActivityRecorder\ActivityProvider'
  1. composer update
  2. Publish the database migration for Activity table
php artisan vendor:publish --provider="Chaseconey\ActivityRecorder\ActivityProvider" --tag="migrations"
  1. php artisan migrate
  2. Add the trait to any model and enjoy!
use Chaseconey\ActivityRecorder\RecordsActivity;

Class Tweet extends Model
{
  use RecordsActivity;
}

Details

This package is supposed to be a sort of drop-in addition to your code base for tracking when a user is performing any model events you want. The information is stored in a table, activities, and an Activity model is also provided for accessing that information.

Customizing Processed Events

By default, created, updated, and deleted events are persisted to the table. You can change which events are processed by adding a static property to the model you have added the trait to:

    
	Class Tweet extends Model
    {
        use RecordsActivity;
        
        /**
		 * Which events to record for the auth'd user.
		 *
		 * @var array
		 */
        protected static $recordEvents = ['created'];
    }
    

统计信息

  • 总下载量: 86
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 7
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 7
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-04-17

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固