loadViewsFrom(__DIR__ . '/../../resources/views', 'product'); // Load translation $this->loadTranslationsFrom(__DIR__ . '/../../resources/lang', 'product'); // 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('litepci.product', function ($app) { return $this->app->make('Litepci\Product\Product'); }); // Bind Product to repository $this->app->bind( 'Litepci\Product\Interfaces\ProductRepositoryInterface', \Litepci\Product\Repositories\Eloquent\ProductRepository::class ); // Bind Brand to repository $this->app->bind( 'Litepci\Product\Interfaces\BrandRepositoryInterface', \Litepci\Product\Repositories\Eloquent\BrandRepository::class ); // Bind Category to repository $this->app->bind( 'Litepci\Product\Interfaces\CategoryRepositoryInterface', \Litepci\Product\Repositories\Eloquent\CategoryRepository::class ); // Bind Listing to repository $this->app->bind( 'Litepci\Product\Interfaces\ListingRepositoryInterface', \Litepci\Product\Repositories\Eloquent\ListingRepository::class ); // Bind Tag to repository $this->app->bind( 'Litepci\Product\Interfaces\TagRepositoryInterface', \Litepci\Product\Repositories\Eloquent\TagRepository::class ); // Bind Review to repository $this->app->bind( 'Litepci\Product\Interfaces\ReviewRepositoryInterface', \Litepci\Product\Repositories\Eloquent\ReviewRepository::class ); $this->app->register(\Litepci\Product\Providers\AuthServiceProvider::class); $this->app->register(\Litepci\Product\Providers\RouteServiceProvider::class); } /** * Get the services provided by the provider. * * @return array */ public function provides() { return ['litepci.product']; } /** * Publish resources. * * @return void */ private function publishResources() { // Publish configuration file $this->publishes([__DIR__ . '/../../config/config.php' => config_path('litepci/product.php')], 'config'); // Publish admin view $this->publishes([__DIR__ . '/../../resources/views' => base_path('resources/views/vendor/product')], 'view'); // Publish language files $this->publishes([__DIR__ . '/../../resources/lang' => base_path('resources/lang/vendor/product')], 'lang'); // Publish public files and assets. $this->publishes([__DIR__ . '/public/' => public_path('/')], 'public'); } }