loadViewsFrom(__DIR__ . '/../../resources/views', 'contractsform'); // Load translation $this->loadTranslationsFrom(__DIR__ . '/../../resources/lang', 'contractsform'); // Load migrations $this->loadMigrationsFrom(__DIR__ . '/../../database/migrations'); // Call pblish redources function $this->publishResources(); } /** * Register the service provider. * * @return void */ public function register() { $this->mergeConfig(); $this->app->register(\Bixo\Contractsform\Providers\AuthServiceProvider::class); $this->app->register(\Bixo\Contractsform\Providers\RouteServiceProvider::class); } /** * Merges user's and contractsform's configs. * * @return void */ protected function mergeConfig() { $this->mergeConfigFrom( __DIR__ . '/../../config/config.php', 'bixo.contractsform' ); $this->mergeConfigFrom( __DIR__ . '/../../config/tender.php', 'bixo.contractsform.tender' ); $this->mergeConfigFrom( __DIR__ . '/../../config/contract.php', 'bixo.contractsform.contract' ); $this->mergeConfigFrom( __DIR__ . '/../../config/deal.php', 'bixo.contractsform.deal' ); $this->mergeConfigFrom( __DIR__ . '/../../config/quotation.php', 'bixo.contractsform.quotation' ); $this->mergeConfigFrom( __DIR__ . '/../../config/certificate.php', 'bixo.contractsform.certificate' ); } /** * Get the services provided by the provider. * * @return array */ public function provides() { return ['bixo.contractsform']; } /** * Publish resources. * * @return void */ private function publishResources() { // Publish configuration file $this->publishes([__DIR__ . '/../../config/' => config_path('bixo/contractsform')], 'config'); // Publish admin view $this->publishes([__DIR__ . '/../../resources/views' => base_path('resources/views/vendor/contractsform')], 'view'); // Publish language files $this->publishes([__DIR__ . '/../../resources/lang' => base_path('resources/lang/vendor/contractsform')], 'lang'); // Publish public files and assets. $this->publishes([__DIR__ . '/public/' => public_path('/')], 'public'); } }