Skip to main content

Black Friday 2025! Only until December 1st: coupon FRIDAY25 for 40% off Yearly/Lifetime membership!

Read more here

LaraBug/larabug-app

218 stars
1 code files
View LaraBug/larabug-app on GitHub

app/Http/Controllers/HomeController.php

Open in GitHub
use 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();
});
}
//
}

We'd Love Your Feedback

Tell us what you like or what we can improve

Feel free to share anything you like or dislike about this page or the platform in general.