added basic traffic meter for upload/download

This commit is contained in:
Peter Papp
2020-11-23 18:29:23 +01:00
parent fefc10afb8
commit cb417ea76d
7 changed files with 106 additions and 359 deletions

View File

@@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateTrafficTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('traffic', function (Blueprint $table) {
$table->bigInteger('user_id');
$table->bigInteger('upload')->default(0);
$table->bigInteger('download')->default(0);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('traffics');
}
}