BlockIp.php 391 B

123456789101112131415161718192021222324
  1. <?php
  2. namespace App\Models;
  3. use App\Utils\Tools;
  4. class BlockIp extends Model
  5. {
  6. protected $connection = "default";
  7. protected $table = "blockip";
  8. public function node()
  9. {
  10. return Node::where("id", $this->attributes['nodeid'])->first();
  11. }
  12. public function time()
  13. {
  14. return date("Y-m-d H:i:s", $this->attributes['datetime']);
  15. }
  16. }