app/Http/Controllers/CalcHistController.php 1 location
|
@@ 41-50 (lines=10) @@
|
| 38 |
|
/** |
| 39 |
|
* @return string |
| 40 |
|
*/ |
| 41 |
|
public function getSimulatorHistory() |
| 42 |
|
{ |
| 43 |
|
$user = Auth::user(); |
| 44 |
|
|
| 45 |
|
$data = DB::table('simulator_history')->where('user_id','=',$user->id)->get(); |
| 46 |
|
|
| 47 |
|
$data = json_encode($data); |
| 48 |
|
|
| 49 |
|
return $data; |
| 50 |
|
} |
| 51 |
|
|
| 52 |
|
} |
| 53 |
|
|
app/Http/Controllers/CalculatorApiController.php 1 location
|
@@ 87-94 (lines=8) @@
|
| 84 |
|
return $this->response->withItem($calcul, $this->calcul_transformer); |
| 85 |
|
} |
| 86 |
|
|
| 87 |
|
public function getUserCalculs() |
| 88 |
|
{ |
| 89 |
|
$user = Auth::user(); |
| 90 |
|
|
| 91 |
|
$data = DB::table('simulator_history')->where('user_id','=',$user->id)->get(); |
| 92 |
|
|
| 93 |
|
return $data; |
| 94 |
|
} |
| 95 |
|
|
| 96 |
|
|
| 97 |
|
} |