Files
vuefilemanager/app/Models/Traffic.php
2021-04-25 09:02:00 +02:00

34 lines
584 B
PHP

<?php
namespace App\Models;
use Illuminate\Support\Str;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class Traffic extends Model
{
use HasFactory;
protected $fillable = [
'user_id',
'upload',
'download',
];
public $incrementing = false;
protected $keyType = 'string';
/**
* Model events
*/
protected static function boot()
{
parent::boot();
static::creating(function ($model) {
$model->id = (string) Str::uuid();
});
}
}