-
app/Http/Controllers/StatisticsController.php
Open in GitHubclass StatisticsController extends Controller { // public function conversations() { $totalActivatedConversations = 0; $this->getActiveScenarios()->each(function (Scenario $scenario) use (&$totalActivatedConversations) { $totalActivatedConversations += $scenario->getConversations()->count(); }); return [ 'value' => $totalActivatedConversations, ]; } // }