/** * Get the amount of plates per mouse that have been processed. * @param \App\Mouse $mouse * @return mixed */ public function getCompletedCount(Mouse $mouse) { $count = $mouse->plates()->where('isProcessed', 1)->count(); return $count; }