Merge branch 'master' of https://github.com/yanwenwu/catch-admin
This commit is contained in:
commit
09b20c255b
@ -4,18 +4,13 @@ namespace catchAdmin\system\model\search;
|
|||||||
|
|
||||||
trait LoginLogSearch
|
trait LoginLogSearch
|
||||||
{
|
{
|
||||||
public function searchLoginNameAttr($query, $value, $data)
|
public function searchStartAtAttr($query, $value, $data)
|
||||||
{
|
{
|
||||||
return $query->whereLike('login_name', $value);
|
return $query->whereTime('login_at', '>=', strtotime($value));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function searchLoginIpAttr($query, $value, $data)
|
public function searchEndAtAttr($query, $value, $data)
|
||||||
{
|
{
|
||||||
return $query->whereLike('login_ip', $value);
|
return $query->whereTime('login_at', '<=', strtotime($value));
|
||||||
}
|
|
||||||
|
|
||||||
public function searchLoginAtAttr($query, $value, $data)
|
|
||||||
{
|
|
||||||
return $query->whereTime('login_at', 'between', $value);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user