whereBetween('created_at',[strtotime($search['time']['start']), strtotime($search['time']['end'])]); } if (!empty($search['type'])) { $query->whereType($search['type']); } return $query; } public static function getTypes() { $configs = \app\backend\modules\income\Income::current()->getItems(); return $configs; } }