diff --git a/src/ClassControllerServiceProvider.php b/src/ClassControllerServiceProvider.php index 09d17ad..0538a87 100644 --- a/src/ClassControllerServiceProvider.php +++ b/src/ClassControllerServiceProvider.php @@ -21,9 +21,14 @@ public function boot() if ($this->app->runningInConsole()) { $this->publishes([ - __DIR__.'/../config/config.php' => config_path('classcontroller.php'), + __DIR__ . '/../config/config.php' => config_path('classcontroller.php'), ], 'config'); + // Publish the stubs + $this->publishes([ + __DIR__ . '/../stubs' => base_path('stubs'), + ], 'stubs'); + // Publishing the views. /*$this->publishes([ __DIR__.'/../resources/views' => resource_path('views/vendor/classcontroller'), @@ -50,7 +55,7 @@ public function boot() public function register() { // Automatically apply the package configuration - $this->mergeConfigFrom(__DIR__.'/../config/config.php', 'classcontroller'); + $this->mergeConfigFrom(__DIR__ . '/../config/config.php', 'classcontroller'); // Register the main class to use with the facade $this->app->singleton('classcontroller', function () { diff --git a/stubs/controller.class.stub b/stubs/controller.class.stub new file mode 100644 index 0000000..c414d27 --- /dev/null +++ b/stubs/controller.class.stub @@ -0,0 +1,34 @@ +class(). If you need to do additional operations on the class to set it up, you should over-write this method and do your own logic here. Remove if not needed. + * + * @return void + */ + protected function postClassSetup(): void + { + // + } + +} \ No newline at end of file