/** * Get all pluggables. * * @return array */ protected function getPluggables() { $pluggables = $this->pluggable->all(); $results = []; foreach ($pluggables as $pluggable) { $results[] = $this->getPluggableInformation($pluggable); } return array_filter($results); }
/** * Get module migration path. * * @return string */ protected function getPath() { $path = $this->pluggable->getPluggablePath($this->pluggableName); return $path . 'Database/Migrations/'; }
/** * Replace placeholder text with correct values. * * @return string */ protected function formatContent($content) { return str_replace(['{{slug}}', '{{name}}', '{{namespace}}'], [$this->slug, $this->name, $this->pluggable->getNamespace()], $content); }