-
app/Http/Controllers/HomeController.php
Open in GitHubuse App\Models\Exception; class HomeController extends Controller { public function index() { // $exceptionChart = Exception::whereIn('project_id', $projects) ->where('created_at', '>', now()->subDays(7)) ->oldest() ->select(['created_at']) ->get() ->groupBy(function ($exception) { return $exception->created_at->format('Y-m-d'); })->map(function ($exceptions) { return $exceptions->count(); }); } // }