@@ -1,7 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | |
| 4 | -Route::group(['prefix' => 'api/'], function () { |
|
| 4 | +Route::group([ 'prefix' => 'api/' ], function() { |
|
| 5 | 5 | Route::post('calc/save', 'CalculatorApiController@store'); |
| 6 | 6 | Route::post('calc/getUserCalculs', 'CalculatorApiController@getUserCalculs'); |
| 7 | 7 | Route::post('history/getHistoryWithSymbol', 'HistoryApiController@getHistoryWithSymbol'); |
@@ -23,10 +23,10 @@ discard block |
||
| 23 | 23 | |
| 24 | 24 | public function getHistoryWithSymbol(Request $request) |
| 25 | 25 | { |
| 26 | - $symbol=$request->symbol_query; |
|
| 26 | + $symbol = $request->symbol_query; |
|
| 27 | 27 | |
| 28 | 28 | $query = DB::table('exchange_history') |
| 29 | - ->where('symbol','=',$symbol) |
|
| 29 | + ->where('symbol', '=', $symbol) |
|
| 30 | 30 | ->get(); |
| 31 | 31 | |
| 32 | 32 | return $query; |
@@ -34,11 +34,11 @@ discard block |
||
| 34 | 34 | |
| 35 | 35 | public function getHistoryOnlyDatesAndValues(Request $request) |
| 36 | 36 | { |
| 37 | - $symbol=$request->symbol_query; |
|
| 37 | + $symbol = $request->symbol_query; |
|
| 38 | 38 | |
| 39 | 39 | $query = DB::table('exchange_history') |
| 40 | - ->select('symbol','dates','values') |
|
| 41 | - ->where('symbol','=',$symbol) |
|
| 40 | + ->select('symbol', 'dates', 'values') |
|
| 41 | + ->where('symbol', '=', $symbol) |
|
| 42 | 42 | ->get(); |
| 43 | 43 | |
| 44 | 44 | return $query; |
@@ -88,7 +88,7 @@ |
||
| 88 | 88 | { |
| 89 | 89 | $user = Auth::user(); |
| 90 | 90 | |
| 91 | - $data = DB::table('simulator_history')->where('user_id','=',$user->id)->get(); |
|
| 91 | + $data = DB::table('simulator_history')->where('user_id', '=', $user->id)->get(); |
|
| 92 | 92 | |
| 93 | 93 | return $data; |
| 94 | 94 | } |