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