public function getBancoByCode($code) { $count = ConfigBanco::where('code', '=', $code)->count(); if ($count != 0) { return response()->json(['status' => true, 'data' => ConfigBanco::where('code', '=', $code)->first()]); } else { return response()->json(['status' => false]); } }
/** * Localizar o banco pelo codigo. * @param $code * @return mixed */ public function getBankName($code) { $bank = ConfigBanco::select('config_bancos.banco')->where('code', $code)->first(); return $bank; }