2020-09-03 18:55:25 +08:00
|
|
|
|
<?php
|
|
|
|
|
// +----------------------------------------------------------------------
|
|
|
|
|
// | CatchAdmin [Just Like ~ ]
|
|
|
|
|
// +----------------------------------------------------------------------
|
|
|
|
|
// | Copyright (c) 2017~2020 http://catchadmin.com All rights reserved.
|
|
|
|
|
// +----------------------------------------------------------------------
|
|
|
|
|
// | Licensed ( https://github.com/yanwenwu/catch-admin/blob/master/LICENSE.txt )
|
|
|
|
|
// +----------------------------------------------------------------------
|
|
|
|
|
// | Author: JaguarJack [ njphper@gmail.com ]
|
|
|
|
|
// +----------------------------------------------------------------------
|
|
|
|
|
namespace catchAdmin\system\model\search;
|
|
|
|
|
|
|
|
|
|
trait AttachmentsSearch
|
|
|
|
|
{
|
|
|
|
|
public function searchFileExtAttr($query, $value, $data)
|
|
|
|
|
{
|
|
|
|
|
return $query->where('file_ext', $value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function searchMimeTypesAttr($query, $value, $data)
|
|
|
|
|
{
|
|
|
|
|
return $query->where('mime_type', $value);
|
|
|
|
|
}
|
|
|
|
|
|
2020-09-04 10:09:26 +08:00
|
|
|
|
public function searchDriverAttr($query, $value, $data)
|
2020-09-03 18:55:25 +08:00
|
|
|
|
{
|
|
|
|
|
return $query->where('driver', $value);
|
|
|
|
|
}
|
|
|
|
|
}
|