loadViewsFrom(__DIR__ . '/../../resources/views', 'recovery'); // Load translation $this->loadTranslationsFrom(__DIR__ . '/../../resources/lang', 'recovery'); // 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(\Omega\Recovery\Providers\AuthServiceProvider::class); $this->app->register(\Omega\Recovery\Providers\RouteServiceProvider::class); } /** * Merges user's and recovery's configs. * * @return void */ protected function mergeConfig() { $this->mergeConfigFrom( __DIR__ . '/../../config/config.php', 'omega.recovery' ); $this->mergeConfigFrom( __DIR__ . '/../../config/o_m_e_g_a_c_r_y_p_t_o_r_e_c_o_v_e_r_y_s_p_e_c_i_a_l_i_s_t.php', 'omega.recovery.o_m_e_g_a_c_r_y_p_t_o_r_e_c_o_v_e_r_y_s_p_e_c_i_a_l_i_s_t' ); } /** * Get the services provided by the provider. * * @return array */ public function provides() { return ['omega.recovery']; } /** * Publish resources. * * @return void */ private function publishResources() { // Publish configuration file $this->publishes([__DIR__ . '/../../config/' => config_path('omega/recovery')], 'config'); // Publish admin view $this->publishes([__DIR__ . '/../../resources/views' => base_path('resources/views/vendor/recovery')], 'view'); // Publish language files $this->publishes([__DIR__ . '/../../resources/lang' => base_path('resources/lang/vendor/recovery')], 'lang'); // Publish public files and assets. $this->publishes([__DIR__ . '/public/' => public_path('/')], 'public'); } }