コード例 #1
0
ファイル: ModuleServiceProvider.php プロジェクト: zedx/core
 /**
  * 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;
     });
 }
コード例 #2
0
ファイル: ThemeMakeCommand.php プロジェクト: zedx/core
 /**
  * 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();
 }