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