loadViewsFrom(__DIR__ . '/../../resources/views', 'profile'); // Load translation $this->loadTranslationsFrom(__DIR__ . '/../../resources/lang', 'profile'); // 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('litematrimony.profile', function ($app) { return $this->app->make('Litematrimony\Profile\Profile'); }); // Bind Profile to repository $this->app->bind( 'Litematrimony\Profile\Interfaces\ProfileRepositoryInterface', \Litematrimony\Profile\Repositories\Eloquent\ProfileRepository::class ); // Bind Visit to repository $this->app->bind( 'Litematrimony\Profile\Interfaces\VisitRepositoryInterface', \Litematrimony\Profile\Repositories\Eloquent\VisitRepository::class ); // Bind Shortlist to repository $this->app->bind( 'Litematrimony\Profile\Interfaces\ShortlistRepositoryInterface', \Litematrimony\Profile\Repositories\Eloquent\ShortlistRepository::class ); // Bind Request to repository $this->app->bind( 'Litematrimony\Profile\Interfaces\RequestRepositoryInterface', \Litematrimony\Profile\Repositories\Eloquent\RequestRepository::class ); $this->app->register(\Litematrimony\Profile\Providers\AuthServiceProvider::class); $this->app->register(\Litematrimony\Profile\Providers\EventServiceProvider::class); $this->app->register(\Litematrimony\Profile\Providers\RouteServiceProvider::class); } /** * Get the services provided by the provider. * * @return array */ public function provides() { return ['litematrimony.profile']; } /** * Publish resources. * * @return void */ private function publishResources() { // Publish configuration file $this->publishes([__DIR__ . '/../../config/config.php' => config_path('litematrimony/profile.php')], 'config'); // Publish admin view $this->publishes([__DIR__ . '/../../resources/views' => base_path('resources/views/vendor/profile')], 'view'); // Publish language files $this->publishes([__DIR__ . '/../../resources/lang' => base_path('resources/lang/vendor/profile')], 'lang'); // Publish public files and assets. $this->publishes([__DIR__ . '/public/' => public_path('/')], 'public'); } }