catchAdmin/catch/system/model/search/LoginLogSearch.php

17 lines
362 B
PHP
Raw Normal View History

2020-07-18 17:12:07 +08:00
<?php
namespace catchAdmin\system\model\search;
trait LoginLogSearch
{
2020-09-24 12:19:41 +08:00
public function searchStartAtAttr($query, $value, $data)
2020-07-18 17:12:07 +08:00
{
2020-09-24 12:19:41 +08:00
return $query->whereTime('login_at', '>=', strtotime($value));
2020-07-18 17:12:07 +08:00
}
2020-09-24 12:19:41 +08:00
public function searchEndAtAttr($query, $value, $data)
2020-07-18 17:12:07 +08:00
{
2020-09-24 12:19:41 +08:00
return $query->whereTime('login_at', '<=', strtotime($value));
2020-07-18 17:12:07 +08:00
}
}