thumb?$http_url.$this->thumb:""; } public function getTypeNameAttribute(){ return config('adconfig.transfer_type')[$this->type]; } public static function getListToType(){ $gateways = self::where('is_checked', 1)->orderBy('type', 'desc')->orderBy('id', 'desc')->get();// $arr = []; if (count($gateways) > 0) { foreach ($gateways as $k => $v) { $arr[$v->type]['name']=config('adconfig.transfer_type')[$v->type]; $arr[$v->type]['data'][]=$v; } } return $arr; } }