transactions()->where('amount', '<', 0)->first()->account; $fromAccountName = strtolower($sourceAccount->name); $search = strtolower($this->triggerValue); if ($fromAccountName == $search) { Log::debug('"' . $fromAccountName . '" equals "' . $search . '" exactly. Return true.'); return true; } Log::debug('"' . $fromAccountName . '" does not equal "' . $search . '". Return false.'); return false; } }