canerdogan / laravel-leaderboard
Laravel 排行榜模块,除了支持永久排行榜外,还支持周期性排行榜:每日、每周、每月选项,由 Redis 支持。
v1.0
2020-04-03 07:10 UTC
Requires
- php: ^7.1
- illuminate/support: ^4.0|^5.0
- predis/predis: ^1.1
Requires (Dev)
- mockery/mockery: ^0.9
- orchestra/testbench: ~3.0
- phpunit/phpunit: ~4.0|~5.0
- satooshi/php-coveralls: ^1.0
- squizlabs/php_codesniffer: 2.*
This package is auto-updated.
Last update: 2024-08-29 04:25:51 UTC
README
一个 Laravel 排行榜模块,除了支持永久排行榜外,还支持周期性排行榜:每日、每周、每月选项,由 Redis 支持。
以下是如何使用它的演示
文档
在使用此软件包时遇到困难?发现了错误?您有关于改进活动日志的一般性问题或建议吗?请自由地在 GitHub 上创建问题,我们将尽快解决。
安装
您可以通过 composer 安装此软件包
composer require canerdogan/laravel-leaderboard
该软件包将自动注册自己。
您可以可选地通过以下命令发布配置文件:
php artisan vendor:publish --provider="Spatie\Activitylog\ActivitylogServiceProvider" --tag="config"
这是发布配置文件的内容
return [ /* * If set to false, no activities will be saved to the database. */ 'enabled' => env('ACTIVITY_LOGGER_ENABLED', true), /* * When the clean-command is executed, all recording activities older than * the number of days specified here will be deleted. */ 'delete_records_older_than_days' => 365, /* * If no log name is passed to the activity() helper * we use this default log name. */ 'default_log_name' => 'default', /* * You can specify an auth driver here that gets user models. * If this is null we'll use the default Laravel auth driver. */ 'default_auth_driver' => null, /* * If set to true, the subject returns soft deleted models. */ 'subject_returns_soft_deleted_models' => false, /* * This model will be used to log activity. The only requirement is that * it should be or extend the Spatie\Activitylog\Models\Activity model. */ 'activity_model' => \Spatie\Activitylog\Models\Activity::class, /* * This is the name of the table that will be created by the migration and * used by the Activity model shipped with this package. */ 'table_name' => 'activity_log', ];
变更日志
请参阅 CHANGELOG 以获取有关最近更改的更多信息。
测试
$ composer test
贡献
请参阅 CONTRIBUTING 以获取详细信息。
鸣谢
支持我们
您的业务是否依赖于我们的贡献?请联系并支持我们在 Buy Me a Coffee。所有承诺都将用于分配人力资源以维护和开发新功能。
许可
MIT 许可证 (MIT)。请参阅 许可文件 以获取更多信息。