loadViewsFrom(__DIR__ . '/../../resources/views', 'hardskill'); // Load translation $this->loadTranslationsFrom(__DIR__ . '/../../resources/lang', 'hardskill'); // 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('superrobota.hardskill', function ($app) { return $this->app->make('Superrobota\Hardskill\Hardskill'); }); // Bind Craft to repository $this->app->bind( 'Superrobota\Hardskill\Interfaces\CraftRepositoryInterface', \Superrobota\Hardskill\Repositories\Eloquent\CraftRepository::class ); // Bind Sector to repository $this->app->bind( 'Superrobota\Hardskill\Interfaces\SectorRepositoryInterface', \Superrobota\Hardskill\Repositories\Eloquent\SectorRepository::class ); // Bind Position to repository $this->app->bind( 'Superrobota\Hardskill\Interfaces\PositionRepositoryInterface', \Superrobota\Hardskill\Repositories\Eloquent\PositionRepository::class ); // Bind Hardskill to repository $this->app->bind( 'Superrobota\Hardskill\Interfaces\HardskillRepositoryInterface', \Superrobota\Hardskill\Repositories\Eloquent\HardskillRepository::class ); $this->app->register(\Superrobota\Hardskill\Providers\AuthServiceProvider::class); $this->app->register(\Superrobota\Hardskill\Providers\RouteServiceProvider::class); } /** * Get the services provided by the provider. * * @return array */ public function provides() { return ['superrobota.hardskill']; } /** * Publish resources. * * @return void */ private function publishResources() { // Publish configuration file $this->publishes([__DIR__ . '/../../config/config.php' => config_path('superrobota/hardskill.php')], 'config'); // Publish admin view $this->publishes([__DIR__ . '/../../resources/views' => base_path('resources/views/vendor/hardskill')], 'view'); // Publish language files $this->publishes([__DIR__ . '/../../resources/lang' => base_path('resources/lang/vendor/hardskill')], 'lang'); // Publish public files and assets. $this->publishes([__DIR__ . '/public/' => public_path('/')], 'public'); } }