triggerValue); $attachments = $journal->attachments()->count(); if ($attachments >= $minimum) { Log::debug( sprintf( 'RuleTrigger HasAttachment for journal #%d: count is %d, is more than or equal to %d, return true.', $journal->id, $attachments, $minimum ) ); return true; } Log::debug(sprintf('RuleTrigger HasAttachment for journal #%d: count is %d, is less than %d, return true.', $journal->id, $attachments, $minimum)); return false; } }