rockbuzz/lara-activities
Composer 安装命令:
composer require rockbuzz/lara-activities
包简介
Lara Activities is a package that monitors activities for creating, editing, and deleting features, including manipulations of related tables.
关键字:
README 文档
README
Lara Activities is a Laravel package that monitors activities for creating, editing, and deleting features, including manipulations of related tables.
Requirements
PHP: >=7.3
Install
$ composer require rockbuzz/lara-activities
$ php artisan vendor:publish --provider="Rockbuzz\LaraActivities\ServiceProvider" --tag=migrations
$ php artisan migrate
Usage
namespace App; use Illuminate\Database\Eloquent\Model; use Rockbuzz\LaraActivities\Traits\RecordsActivity; class Post extends Model { use RecordsActivity; //optional define activity table //public function __construct(array $attributes = []) //{ // parent::__construct($attributes); // // $this->activityTable = 'post_activities'; //} }
Configuration
$ php artisan vendor:publish --provider="Rockbuzz\LaraActivities\ServiceProvider" --tag=config
You can define the layout of the views
'views' => [ 'layout' => 'layouts.admin' ]
You can override routes, controllers and middleware
'routes' => [ 'index' => [ 'uri' => 'admin/activities', 'as' => 'admin.activities', 'middleware' => ['web', 'auth'], 'uses' => 'Rockbuzz\LaraActivities\Controllers\ActivitiesController@index' ] ]
You can define which models will be searched in the activity table
'subjects_class' => [ 'App\Post', 'App\Comment' ],
You can also customize the views
$ php artisan vendor:publish --provider="Rockbuzz\LaraActivities\ServiceProvider" --tag=views
You can also customize the lang
$ php artisan vendor:publish --provider="Rockbuzz\LaraActivities\ServiceProvider" --tag=lang
License
The Lara Activities is open-sourced software licensed under the MIT license.
统计信息
- 总下载量: 5.11k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-03-09