loadViewsFrom(__DIR__ . '/../../resources/views', 'promotional_banner'); // Load translation $this->loadTranslationsFrom(__DIR__ . '/../../resources/lang', 'promotional_banner'); // 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('litecms.promotional_banner', function ($app) { return $this->app->make('Litecms\PromotionalBanner\PromotionalBanner'); }); // Bind Banner to repository $this->app->bind( 'Litecms\PromotionalBanner\Interfaces\BannerRepositoryInterface', \Litecms\PromotionalBanner\Repositories\Eloquent\BannerRepository::class ); $this->app->register(\Litecms\PromotionalBanner\Providers\AuthServiceProvider::class); $this->app->register(\Litecms\PromotionalBanner\Providers\EventServiceProvider::class); $this->app->register(\Litecms\PromotionalBanner\Providers\RouteServiceProvider::class); } /** * Get the services provided by the provider. * * @return array */ public function provides() { return ['litecms.promotional_banner']; } /** * Publish resources. * * @return void */ private function publishResources() { // Publish configuration file $this->publishes([__DIR__ . '/../../config/config.php' => config_path('litecms/promotional_banner.php')], 'config'); // Publish admin view $this->publishes([__DIR__ . '/../../resources/views' => base_path('resources/views/vendor/promotional_banner')], 'view'); // Publish language files $this->publishes([__DIR__ . '/../../resources/lang' => base_path('resources/lang/vendor/promotional_banner')], 'lang'); // Publish public files and assets. $this->publishes([__DIR__ . '/public/' => public_path('/')], 'public'); } }