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