Browse Source

first iteration of search functionality - likely to fail hard

master
jk 3 years ago
parent
commit
3c55315f79
  1. 5
      app/Http/Controllers/SearchController.php

5
app/Http/Controllers/SearchController.php

@ -106,10 +106,11 @@ class SearchController extends Controller
$fermentarr = array();
$i = 0;
foreach ($fermentations as $fermentation){
$j = $i + 1;
if ($i == 0){
$fermentarr = array('stage'=>$i + 1, 'temp'=>$fermentation->temperature, 'duration'=>$fermentation->duration);
$fermentarr = array('stage'=>$j, 'temp'=>$fermentation->temperature, 'duration'=>$fermentation->duration);
} else {
array_push($fermentarr, array('stage'=>$i + 1, 'temp'=>$fermentation->temperature, 'duration'=>$fermentation->duration));
array_push($fermentarr, array('stage'=>$j, 'temp'=>$fermentation->temperature, 'duration'=>$fermentation->duration));
};
$i++;
};

Loading…
Cancel
Save