You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Malio/app/Models/NodeInfoLog.php

23 lines
427 B
PHTML

9 years ago
<?php
8 years ago
9 years ago
namespace App\Models;
class NodeInfoLog extends Model
{
protected $connection = 'default';
protected $table = 'ss_node_info';
8 years ago
9 years ago
public function getNodeLoad()
{
$load = $this->attributes['load'];
$exp = explode(' ', $load);
9 years ago
return $exp[0];
}
8 years ago
9 years ago
public function getTime()
{
$time = $this->attributes['log_time'];
return date('Y-m-d H:i:s', $time);
}
}