diff --git a/app/Http/Controllers/SearchController.php b/app/Http/Controllers/SearchController.php index 8b655c5..dfe565d 100644 --- a/app/Http/Controllers/SearchController.php +++ b/app/Http/Controllers/SearchController.php @@ -47,9 +47,9 @@ class SearchController extends Controller foreach ($grains as $grain){ $grainname = Grain::where('id', $grain->grain_id)->value('name'); if ($i == 0){ - $grainarr[]= array('id'=>$grain->grain_id, 'name'=>$grainname); + $grainarr[]= array('id'=>$grain->grain_id, 'name'=>$grainname, 'amount'=>$grain->amount, 'grain_bill'=>$grain->grain_bill); } else { - array_push($grainarr, array('id'=>$grain->grain_id, 'name'=>$grainname)); + array_push($grainarr, array('id'=>$grain->grain_id, 'name'=>$grainname, 'amount'=>$grain->amount, 'grain_bill'=>$grain->grain_bill)); }; $i++; }; diff --git a/resources/views/search/results.blade.php b/resources/views/search/results.blade.php index 7b1b730..6767036 100644 --- a/resources/views/search/results.blade.php +++ b/resources/views/search/results.blade.php @@ -88,7 +88,7 @@ @foreach ($results as $result)