/** * Display a listing of the resource. * * @return Response */ public function index() { $comps = Computation::all(); return response()->json(["data" => $comps->toArray(), "error" => false]); }