/** * Register the application services. * * @return void */ public function register() { Stub::setBasePath(config('modules.stubs.path')); $this->app->singleton('modules', function () { $modules = new ModulesRepository(config('modules.paths.modules')); $modules->registerAll(); return $modules; }); }
/** * Get the contents of the specified stub file by given stub name. * * @param $stub * * @return Stub */ protected function getStubContents($stub) { Stub::setBasePath(config('themes.stubs.path')); return (new Stub('/' . $stub . '.stub', $this->getReplacement($stub)))->render(); }