public function boot()
    {
        $this->publishes([
            dirname(dirname(__DIR__)).'/config/repositories.php' => config_path('repositories.php'),
        ]);

        foreach (config('repositories.repositories', []) as $respository_contract => $repository) {
            $this->app->bind($respository_contract, $repository);
        }

        foreach (config('repositories.repository_transformers', []) as $transformer_contract => $transformer) {
            $this->app->bind($transformer, $transformer);
        }

        foreach (config('repositories.repository_transformers', []) as $repository_class => $transformer) {
            $this->app->when($repository_class)
                ->needs(TransformerContract::class)
                ->give(function () use ($transformer) {
                    return $this->app->make($transformer);
                });
        }

        foreach (config('repositories.contextual_repositories', []) as $controller => $repository) {
            $this->app->when($controller)
              ->needs(RepositoryContract::class)
              ->give($repository);
        }

        $this->commands([
            \CroudTech\Repositories\Console\Commands\CreateRepository::class,
        ]);
    }
public function boot()
    {
        $this->publishes([
            dirname(dirname(__DIR__)).'/config/repositories.php' => config_path('repositories.php'),
        ]);

        foreach (config('repositories.repositories', []) as $respository_contract => $repository) {
            $this->app->bind($respository_contract, $repository);
        }

        foreach (config('repositories.repository_transformers', []) as $transformer_contract => $transformer) {
            $this->app->bind($transformer, $transformer);
        }

        foreach (config('repositories.repository_transformers', []) as $repository_class => $transformer) {
            $this->app->when($repository_class)
                ->needs(TransformerContract::class)
                ->give(function () use ($transformer) {
                    return $this->app->make($transformer);
                });
        }

        foreach (config('repositories.contextual_repositories', []) as $controller => $repository) {
            $this->app->when($controller)
              ->needs(RepositoryContract::class)
              ->give($repository);
        }

        $this->commands([
            \CroudTech\Repositories\Console\Commands\CreateRepository::class,
        ]);
    }
public function boot ( ) { $ this -> publishes ( [ dirname ( dirname ( __DIR__ ) ) . '/config/repositories.php' => config_path ( 'repositories.php' ) , ] ) ; foreach ( config ( 'repositories.repositories' , [ ] ) as $ respository_contract => $ repository ) { $ this -> app -> bind ( $ respository_contract , $ repository ) ; } foreach ( config ( 'repositories.repository_transformers' , [ ] ) as $ transformer_contract => $ transformer ) { $ this -> app -> bind ( $ transformer , $ transformer ) ; } foreach ( config ( 'repositories.repository_transformers' , [ ] ) as $ repository_class => $ transformer ) { $ this -> app -> when ( $ repository_class ) -> needs ( TransformerContract :: class ) -> give ( function ( ) use ( $ transformer ) { return $ this -> app -> make ( $ transformer ) ; } ) ; } foreach ( config ( 'repositories.contextual_repositories' , [ ] ) as $ controller => $ repository ) { $ this -> app -> when ( $ controller ) -> needs ( RepositoryContract :: class ) -> give ( $ repository ) ; } $ this -> commands ( [ \ CroudTech \ Repositories \ Console \ Commands \ CreateRepository :: class , ] ) ; }
Register any repositories.

@return void
Register any repositories .