/** * Scans the theme templates for message references. * @return void */ public function scanForMessages() { $messages = []; foreach (Layout::all() as $layout) { $messages = array_merge($messages, $this->parseContent($layout->markup)); } foreach (Page::all() as $page) { $messages = array_merge($messages, $this->parseContent($page->markup)); } foreach (Partial::all() as $partial) { $messages = array_merge($messages, $this->parseContent($partial->markup)); } Message::importMessages($messages); }