loadViewsFrom(__DIR__ . '/../../../../resources/views', 'nico'); // Load translation $this->loadTranslationsFrom(__DIR__ . '/../../../../resources/lang', 'nico'); // Call pblish redources function $this->publishResources(); } /** * Register the service provider. * * @return void */ public function register() { // Bind facade $this->app->bind('nico', function ($app) { return $this->app->make('Nico\Nico\Nico'); }); // Bind Associations to repository $this->app->bind( \Nico\Nico\Interfaces\AssociationsRepositoryInterface::class, \Nico\Nico\Repositories\Eloquent\AssociationsRepository::class ); // Bind Bureau to repository $this->app->bind( \Nico\Nico\Interfaces\BureauRepositoryInterface::class, \Nico\Nico\Repositories\Eloquent\BureauRepository::class ); // Bind Commune to repository $this->app->bind( \Nico\Nico\Interfaces\CommuneRepositoryInterface::class, \Nico\Nico\Repositories\Eloquent\CommuneRepository::class ); // Bind Discipline to repository $this->app->bind( \Nico\Nico\Interfaces\DisciplineRepositoryInterface::class, \Nico\Nico\Repositories\Eloquent\DisciplineRepository::class ); $this->app->register(\Nico\Nico\Providers\AuthServiceProvider::class); $this->app->register(\Nico\Nico\Providers\EventServiceProvider::class); $this->app->register(\Nico\Nico\Providers\RouteServiceProvider::class); // $this->app->register(\Nico\Nico\Providers\WorkflowServiceProvider::class); } /** * Get the services provided by the provider. * * @return array */ public function provides() { return ['nico']; } /** * Publish resources. * * @return void */ private function publishResources() { // Publish configuration file $this->publishes([__DIR__ . '/../../../../config/config.php' => config_path('nico/nico.php')], 'config'); // Publish admin view $this->publishes([__DIR__ . '/../../../../resources/views' => base_path('resources/views/vendor/nico')], 'view'); // Publish language files $this->publishes([__DIR__ . '/../../../../resources/lang' => base_path('resources/lang/vendor/nico')], 'lang'); // Publish migrations $this->publishes([__DIR__ . '/../../../../database/migrations/' => base_path('database/migrations')], 'migrations'); // Publish seeds $this->publishes([__DIR__ . '/../../../../database/seeds/' => base_path('database/seeds')], 'seeds'); // Publish public files and assets. $this->publishes([__DIR__ . '/public/' => public_path('/')], 'public'); } }