Skip to main content

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

Read more here

agorakit/agorakit

434 stars
1 code files
View agorakit/agorakit on GitHub

app/Http/Controllers/GroupInsightsController.php

Open in GitHub
class GroupInsightsController extends Controller
{
//
public function index(Group $group)
{
//
$results = \App\Discussion::selectRaw('year(created_at) year, extract(YEAR_MONTH FROM created_at) AS yearmonth, monthname(created_at) month, count(*) data')
->groupBy('yearmonth')
->orderBy('yearmonth', 'asc')
->where('group_id', $group->id)
->get();
//
}
//
}

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.