updated reports

This commit is contained in:
denisdulici
2020-01-18 13:11:19 +03:00
parent 78ede398f2
commit ead2256589
9 changed files with 27 additions and 26 deletions

View File

@ -19,7 +19,7 @@ class Reports extends Controller
*/
public function index()
{
$classes = $categories = [];
$totals = $icons = $categories = [];
$reports = Report::all();
@ -30,12 +30,12 @@ class Reports extends Controller
$class = Utility::getClassInstance($report);
$classes[$report->id] = $class;
$totals[$report->id] = $class->getTotal();
$icons[$report->id] = $class->getIcon();
$categories[$class->getCategory()][] = $report;
}
return view('common.reports.index', compact('categories', 'classes'));
return view('common.reports.index', compact('categories', 'totals', 'icons'));
}
/**