searchTerm !== false ? $this->searchTerm : $this->getSession('search'); } protected function setSearchTerm($term) { $this->searchTerm = trim($term); $this->putSession('search', $this->searchTerm); } protected function textMatchesSearch(&$words, $text) { foreach ($words as $word) { $word = trim($word); if (!strlen($word)) { continue; } if (Str::contains(Str::lower($text), $word)) { return true; } } return false; } }