You've already forked lubo_comment_query
							
							修复插件配置问题
This commit is contained in:
		| @@ -60,11 +60,18 @@ class ProgramAppendConstructController extends BaseController | ||||
|     } | ||||
| 
 | ||||
|     public function from_list(Request $request) { | ||||
|         $query = ProgramAppends::query()->groupBy("from")->select("from")->selectRaw("count(1) as total_count")->orderByDesc("total_count"); | ||||
|         if ($request->has("value")) { | ||||
|             $keyword = $request->get("value"); | ||||
|             $query->where("from", "like", "%{$keyword}%"); | ||||
|         } | ||||
|         return $query->get()->toArray(); | ||||
|         $query = ProgramAppends::query()->groupBy("from") | ||||
|             ->select("from") | ||||
|             ->selectRaw("count(1) as total_count") | ||||
|             ->having("total_count", ">", 1) | ||||
|             ->orderByDesc("total_count"); | ||||
|         return $query->get()->map(function ($item) { | ||||
|             return [ | ||||
|                 "text" => $item["from"], | ||||
|                 "value" => $item["from"], | ||||
|                 "alias" => implode("", \pinyin($item["from"], PINYIN_NO_TONE)), | ||||
|                 "abbr" => \pinyin_abbr($item["from"]), | ||||
|             ]; | ||||
|         })->toArray(); | ||||
|     } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user