save
This commit is contained in:
parent
babe9e59eb
commit
d7d52fa5b9
@ -134,7 +134,7 @@ class Crud extends Base
|
||||
$model = $this->model;
|
||||
foreach ($where as $column => $value) {
|
||||
if (is_array($value)) {
|
||||
if (in_array($value[0], ['>', '=', '<', '<>'])) {
|
||||
if (in_array($value[0], ['>', '=', '<', '<>', 'like'])) {
|
||||
$model = $model->where($column, $value[0], $value[1]);
|
||||
} elseif ($value[0] == 'in') {
|
||||
$model = $model->whereIn($column, $value[1]);
|
||||
|
@ -56,6 +56,9 @@ class UploadController extends Crud
|
||||
if (!empty($where['ext']) && is_string($where['ext'])) {
|
||||
$where['ext'] = ['in', explode(',', $where['ext'])];
|
||||
}
|
||||
if (!empty($where['name']) && is_string($where['name'])) {
|
||||
$where['name'] = ['like', "%{$where['name']}%"];
|
||||
}
|
||||
$query = $this->doSelect($where, $field, $order);
|
||||
return $this->doFormat($query, $format, $page_size);
|
||||
}
|
||||
|
@ -1,37 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* This file is part of webman.
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the MIT-LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @author walkor<walkor@workerman.net>
|
||||
* @copyright walkor<walkor@workerman.net>
|
||||
* @link http://www.workerman.net/
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
|
||||
return [];
|
||||
return [
|
||||
// File update detection and automatic reload
|
||||
'monitor' => [
|
||||
'handler' => process\Monitor::class,
|
||||
'reloadable' => false,
|
||||
'constructor' => [
|
||||
// Monitor these directories
|
||||
'monitor_dir' => [
|
||||
app_path(),
|
||||
config_path(),
|
||||
base_path() . '/process',
|
||||
base_path() . '/support',
|
||||
base_path() . '/resource',
|
||||
base_path() . '/.env',
|
||||
],
|
||||
// Files with these suffixes will be monitored
|
||||
'monitor_extensions' => [
|
||||
'php', 'html', 'htm', 'env'
|
||||
]
|
||||
]
|
||||
]
|
||||
];
|
Loading…
Reference in New Issue
Block a user