loadViewsFrom(__DIR__ . '/../../resources/views', 'p1'); // Load translation $this->loadTranslationsFrom(__DIR__ . '/../../resources/lang', 'p1'); // Load migrations $this->loadMigrationsFrom(__DIR__ . '/../../database/migrations'); // Call pblish redources function $this->publishResources(); } /** * Register the service provider. * * @return void */ public function register() { // Bind facade $this->app->bind('test.p1', function ($app) { return $this->app->make('Test\P1\P1'); }); // Bind Module1 to repository $this->app->bind( 'Test\P1\Interfaces\Module1RepositoryInterface', \Test\P1\Repositories\Eloquent\Module1Repository::class ); $this->app->register(\Test\P1\Providers\AuthServiceProvider::class); $this->app->register(\Test\P1\Providers\EventServiceProvider::class); $this->app->register(\Test\P1\Providers\RouteServiceProvider::class); $this->app->register(\Test\P1\Providers\WorkflowServiceProvider::class); } /** * Get the services provided by the provider. * * @return array */ public function provides() { return ['test.p1']; } /** * Publish resources. * * @return void */ private function publishResources() { // Publish configuration file $this->publishes([__DIR__ . '/../../config/config.php' => config_path('test/p1.php')], 'config'); // Publish admin view $this->publishes([__DIR__ . '/../../resources/views' => base_path('resources/views/vendor/p1')], 'view'); // Publish language files $this->publishes([__DIR__ . '/../../resources/lang' => base_path('resources/lang/vendor/p1')], 'lang'); // Publish public files and assets. $this->publishes([__DIR__ . '/public/' => public_path('/')], 'public'); } }