no message
This commit is contained in:
parent
979c603b86
commit
9321eca62f
@ -30,7 +30,13 @@ class GoodPool extends Model
|
|||||||
|
|
||||||
public static function _rand($sClass)
|
public static function _rand($sClass)
|
||||||
{
|
{
|
||||||
$aGood = self::where("class", $sClass)->get()->toArray();
|
$oGood = self::where("class", $sClass)->get();
|
||||||
|
|
||||||
|
if ($oGood->isEmpty()) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
$aGood = $oGood->toArray();
|
||||||
|
|
||||||
$iGoodRandKey = array_rand($aGood);
|
$iGoodRandKey = array_rand($aGood);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user