first(); // // return $oSelf; // } public static function _all() { $oSelf = self::all(); // $oNew; foreach ($oSelf as &$oSelfRow) { $oSelfRow->good = json_decode($oSelfRow->good); } return $oSelf; } public static function _rand($sClass) { $aGood = self::where("class", $sClass)->get()->toArray(); $iGoodRandKey = array_rand($aGood); $aGoodRand = $aGood[$iGoodRandKey]; return $aGoodRand; } public static function _goodToGithub($sGood, $bEnter = true) { $aGood = json_decode($sGood); $str = ""; $i = 0; foreach ($aGood as $sGoodRow) { if ($i !== 0) { $str .= " "; if ($bEnter == true) { $str .= " "; } } $str .= $sGoodRow; $i++; } return $str; } }