loadViewsFrom(__DIR__ . '/../../resources/views', 'deal'); // Load translation $this->loadTranslationsFrom(__DIR__ . '/../../resources/lang', 'deal'); // 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('deal.deal', function ($app) { return $this->app->make('Deal\Deal\Deal'); }); // Bind Product to repository $this->app->bind( 'Deal\Deal\Interfaces\ProductRepositoryInterface', \Deal\Deal\Repositories\Eloquent\ProductRepository::class ); // Bind Flyer to repository $this->app->bind( 'Deal\Deal\Interfaces\FlyerRepositoryInterface', \Deal\Deal\Repositories\Eloquent\FlyerRepository::class ); // Bind Offer to repository $this->app->bind( 'Deal\Deal\Interfaces\OfferRepositoryInterface', \Deal\Deal\Repositories\Eloquent\OfferRepository::class ); // Bind Shop to repository $this->app->bind( 'Deal\Deal\Interfaces\ShopRepositoryInterface', \Deal\Deal\Repositories\Eloquent\ShopRepository::class ); // Bind Category to repository $this->app->bind( 'Deal\Deal\Interfaces\CategoryRepositoryInterface', \Deal\Deal\Repositories\Eloquent\CategoryRepository::class ); $this->app->register(\Deal\Deal\Providers\AuthServiceProvider::class); $this->app->register(\Deal\Deal\Providers\RouteServiceProvider::class); } /** * Get the services provided by the provider. * * @return array */ public function provides() { return ['deal.deal']; } /** * Publish resources. * * @return void */ private function publishResources() { // Publish configuration file $this->publishes([__DIR__ . '/../../config/config.php' => config_path('deal/deal.php')], 'config'); // Publish admin view $this->publishes([__DIR__ . '/../../resources/views' => base_path('resources/views/vendor/deal')], 'view'); // Publish language files $this->publishes([__DIR__ . '/../../resources/lang' => base_path('resources/lang/vendor/deal')], 'lang'); // Publish public files and assets. $this->publishes([__DIR__ . '/public/' => public_path('/')], 'public'); } }