コード例 #1
0
 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]);
 }
コード例 #2
0
 public function index(SearchRequest $request)
 {
     $stocks = StockMetrics::getMetricsByStockList(Stock::lists('stock_code'), "omit");
     return view('pages.stocks')->with(['stockSectors' => Stock::getSectorDropdown(), 'stocks' => $stocks, 'stockSectorName' => $request->stockSector]);
 }