Exemplo n.º 1
0
 public function getChart($id)
 {
     $chart = Chart::findOrFail($id);
     $chart->values = $chart->getValues();
     $chart->symbol = ChartUnit::findOrFail($chart->unit_id)->symbol;
     $chart->type = ChartType::findOrFail($chart->type_id)->type;
     // Don't expose the auth key
     $chart = array_except($chart, 'auth');
     return response()->json(['chart' => $chart]);
 }