public function moderationCharts(Request $request) { $data = $request->all(); $colors = Arrays::colorList(); if (isset($data['step'])) { $data['planet'] = 543210; $chart = Charter::draw(1, $data); if ($chart->anything == 0) { return \App\Myclasses\Response::noData(); } else { return view($this->localeDir . 'charts.firstModeration', compact('chart', 'colors')); } } else { $chart = Charter::draw(3, $data); if (!$chart->result) { return \App\Myclasses\Response::noData(); } return view($this->localeDir . 'charts.threeModer', compact('chart', 'colors')); } }
public function cambiar(Request $request) { $style = $request->input('action'); $object = $request->input('type'); $data = $request->except('action', 'type', '_token'); switch ($style) { case 'change': $result = new \App\Myclasses\Savers\Rewriter($object, $data); break; case 'delete': if (!\Auth::user()->isModerator()) { return back()->with('result', \App\Myclasses\Response::requestResult('noright')); } $result = new \App\Myclasses\Savers\Deleter($object, $data); break; } switch ($result->getMessage()) { case 'ok': $response = \App\Myclasses\Response::requestResult('changeok'); break; case 'fail': $response = \App\Myclasses\Response::requestResult('changefail'); } return back()->with('result', $response); }
protected function getFailedLoginMessage() { return \App\Myclasses\Response::requestResult('faillogin'); }
public function cabinetSearch(Request $request) { $selRep = session('result'); $searchData = $request->all(); $regions = \App\Region::all(); $nothing = \App\Myclasses\Response::requestResult('nothing'); if (isset($searchData['star']) && isset($searchData['planet'])) { $searchData['user_search'] = 1; $searching = new \App\Myclasses\search\SearchEngine($searchData); $systemDs = $searching->getResult(); if ($systemDs) { return view($this->localeDir . 'cabinet.search', compact('regions', 'systemDs', 'searchData', 'selRep')); } else { return view($this->localeDir . 'cabinet.search', compact('regions', 'nothing', 'searchData')); } } return view($this->localeDir . 'cabinet.search', compact('regions', 'selRep')); }