diff --git a/app/Services/TG/Hook/Mod/Box.php b/app/Services/TG/Hook/Mod/Box.php index 7aa07acc..96a1927f 100644 --- a/app/Services/TG/Hook/Mod/Box.php +++ b/app/Services/TG/Hook/Mod/Box.php @@ -9,6 +9,23 @@ use App\Models\BoxCountry as ModelBoxCountry; class Box extends Base { + public function country_hit($aParam) + { + $sName = $aParam["aArg"][1] ?? false; + + if (!$sName) { + return "需要arg[1],name。"; + } + + $oCountry = ModelBoxCountry::where("name", $sName)->get(); + + if(!$oCountry) { + return "不存在".$sName; + } + + return $this->toJson($oCountry); + } + public function country_list() { $oCountry = ModelBoxCountry::all()->toArray();