loadViewsFrom(__DIR__ . '/../../resources/views', 'shipping'); // Load translation $this->loadTranslationsFrom(__DIR__ . '/../../resources/lang', 'shipping'); // 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('shopping.shipping', function ($app) { return $this->app->make('Shopping\Shipping\Shipping'); }); // Bind ShippingMethod to repository $this->app->bind( 'Shopping\Shipping\Interfaces\ShippingMethodRepositoryInterface', \Shopping\Shipping\Repositories\Eloquent\ShippingMethodRepository::class ); // Bind Pincode to repository $this->app->bind( 'Shopping\Shipping\Interfaces\PincodeRepositoryInterface', \Shopping\Shipping\Repositories\Eloquent\PincodeRepository::class ); // Bind Country to repository $this->app->bind( 'Shopping\Shipping\Interfaces\CountryRepositoryInterface', \Shopping\Shipping\Repositories\Eloquent\CountryRepository::class ); // Bind State to repository $this->app->bind( 'Shopping\Shipping\Interfaces\StateRepositoryInterface', \Shopping\Shipping\Repositories\Eloquent\StateRepository::class ); $this->app->register(\Shopping\Shipping\Providers\AuthServiceProvider::class); $this->app->register(\Shopping\Shipping\Providers\EventServiceProvider::class); $this->app->register(\Shopping\Shipping\Providers\RouteServiceProvider::class); } /** * Get the services provided by the provider. * * @return array */ public function provides() { return ['shopping.shipping']; } /** * Publish resources. * * @return void */ private function publishResources() { // Publish configuration file $this->publishes([__DIR__ . '/../../config/config.php' => config_path('shopping/shipping.php')], 'config'); // Publish admin view $this->publishes([__DIR__ . '/../../resources/views' => base_path('resources/views/vendor/shipping')], 'view'); // Publish language files $this->publishes([__DIR__ . '/../../resources/lang' => base_path('resources/lang/vendor/shipping')], 'lang'); // Publish public files and assets. $this->publishes([__DIR__ . '/public/' => public_path('/')], 'public'); } }