no message
This commit is contained in:
parent
b89028a94b
commit
9ca89872dc
@ -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();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user