/** * Return the entity name. * * @param StreamInterface $stream * @param Module $module * @return string */ public function parse(Module $module, StreamInterface $stream) { // First, check if the user has default content $destination = $module->getPath(); $entityName = strtolower(str_singular($stream->getSlug())); $file = $destination . "/seeders/{$entityName}" . ".php"; return file_exists($file) ? file_get_contents($file) : ''; }
/** * Get the addon routes. * * @return array */ public function getRoutes() { $routes = []; foreach (glob($this->addon->getPath('resources/routes/*')) as $include) { $include = (require $include); if (!is_array($include)) { continue; } $routes = array_merge($include, $routes); } return array_merge($this->routes, $routes); }