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