loadViewsFrom(__DIR__ . '/../../resources/views', 'call'); // Load translation $this->loadTranslationsFrom(__DIR__ . '/../../resources/lang', 'call'); // 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('litecrm.call', function ($app) { return $this->app->make('Litecrm\Call\Call'); }); // Bind Dbupload to repository $this->app->bind( 'Litecrm\Call\Interfaces\DbuploadRepositoryInterface', \Litecrm\Call\Repositories\Eloquent\DbuploadRepository::class ); // Bind Call to repository $this->app->bind( 'Litecrm\Call\Interfaces\CallRepositoryInterface', \Litecrm\Call\Repositories\Eloquent\CallRepository::class ); $this->app->register(\Litecrm\Call\Providers\AuthServiceProvider::class); $this->app->register(\Litecrm\Call\Providers\RouteServiceProvider::class); } /** * Get the services provided by the provider. * * @return array */ public function provides() { return ['litecrm.call']; } /** * Publish resources. * * @return void */ private function publishResources() { // Publish configuration file $this->publishes([__DIR__ . '/../../config/config.php' => config_path('litecrm/call.php')], 'config'); // Publish admin view $this->publishes([__DIR__ . '/../../resources/views' => base_path('resources/views/vendor/call')], 'view'); // Publish language files $this->publishes([__DIR__ . '/../../resources/lang' => base_path('resources/lang/vendor/call')], 'lang'); // Publish public files and assets. $this->publishes([__DIR__ . '/public/' => public_path('/')], 'public'); } }