定制 primefaceshero/mobile-traffic-meter 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

primefaceshero/mobile-traffic-meter

Composer 安装命令:

composer require primefaceshero/mobile-traffic-meter

包简介

Mobile Traffic Meter - Package that allows to obtain the traffic by views of a mobile application for reporting

README 文档

README

Package that allows to obtain the traffic by views of a mobile application for reporting

Built With

Installation

Via Composer

$ composer require primefaceshero/mobile-traffic-meter

Add Service Provider to config/app.php in providers section

Primefaceshero\MobileTrafficMeter\MobileTrafficMeterServiceProvider::class,

Make migration and Model

     Schema::create('log_use_events', function (Blueprint $table) {
        $table->bigIncrements('id');
        $table->string('event');
        $table->integer('user_id')->nullable();
        $table->timestamps();
    });
<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class LogUseEvent extends Model
{
    protected $fillable = [
        'event',
        'user_id',
        'created_at'
    ];
}

Seeder

Route::get('/faker/{count}', function ($count) {
    MobileTrafficMeter::faker($count);
    return "done";
});

Methods

use Primefaceshero\MobileTrafficMeter\MobileTrafficMeter;

Insert

Param Description
event Name of the event (required)
user_id User executing the event (optional)
MobileTrafficMeter::insert($event, $user_id)

getAll

MobileTrafficMeter::getAll()

getByUser

Param Description
user_id - (Required)
MobileTrafficMeter::getByUser($user_id)

getByEvent

Param Description
event - (Required)
MobileTrafficMeter::getByEvent($event)

getByEventAndDate

Param Description
event - (Required)
start_date - (Required)
end_date - (Required)
MobileTrafficMeter::getByEventAndDate($event, $start_date, $end_date)

getByUserAndEvent

Param Description
event - (Required)
user_id - (Required)
MobileTrafficMeter::getByUserAndEvent($user_id, $event)

getByDate

Param Description
start_date - (Required)
end_date - (Required)
MobileTrafficMeter::getByEventAndDate($start_date, $end_date)

Usage

See the DemoController how to use the library to get information from the events

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch
  3. Commit your Changes
  4. Push to the Branch
  5. Open a Pull Request

Credits

License

license. Please see the license file for more information.

统计信息

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

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: Blade

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-05-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固