public function show(SearchRequest $request)
 {
     $stocks = StockMetrics::getMetricsByStockList($this->search->getSearchResults($request), $request->omitCondition);
     if ($request->viewType == 'partial') {
         if ($request->section == 'sectorDayGain' || $request->section == 'sectorDayLoss') {
             return view('layouts.partials.sector-day-change-display')->with(['sectorChanges' => SectorHistoricals::getSectorDayChanges($request->section), 'title' => SectorHistoricals::getSectorDayChangeTitle($request->section)]);
         }
         return view('layouts.partials.stock-list-display')->with(['stocks' => $stocks]);
     }
     return view('pages.stocks')->with(['stocks' => $stocks, 'stockSectors' => Stock::getSectorDropdown(), 'stockSectorName' => $request->stockSector]);
 }
 public function otherStocksInSector($sectorName)
 {
     return view('layouts.partials.other-stocks-in-sector')->with(['selectedSector' => $sectorName, 'stocksInSector' => StockMetrics::getMetricsByStockList(Stock::where('sector', $sectorName)->lists('stock_code'), 'all')]);
 }
 public function relatedStocks($id)
 {
     return view('layouts.partials.related-stock-list-display')->with(['relatedStocks' => StockMetrics::getMetricsByStockList(Stock::getRelatedStocks($id), 'omit')]);
 }