notes()->first(); $text = ''; if (!is_null($note)) { $text = strtolower($note->text); } $search = strtolower($this->triggerValue); if ($text === $search && strlen($text) > 0) { Log::debug(sprintf('RuleTrigger NotesAre for journal #%d: "%s" is "%s", return true.', $journal->id, $text, $search)); return true; } Log::debug(sprintf('RuleTrigger NotesAre for journal #%d: "%s" is NOT "%s", return false.', $journal->id, $text, $search)); return false; } }