src/Database/ContentServiceProvider.php
/**
     * Register bindings in the container.
     *
     * @return void
     */
Register bindings in the container.
@return void
Register bindings in the container . @return void
public function register()
    {
        $this->registerDependencies([
            ClosureTableServiceProvider::class,
        ]);
        $this->app->singleton('soda.content.repository', function ($app) {
            return new ContentRepository(new Content);
        });
        $this->app->singleton('soda.content-type.repository', function ($app) {
            return new ContentTypeRepository(new ContentType);
        });
        $this->app->singleton('soda.content-type-block.repository', function ($app) {
            return new ContentTypeBlockRepository(new ContentType, new BlockType);
        });
        $this->app->singleton('soda.content-type-field.repository', function ($app) {
            return new ContentTypeFieldRepository(new ContentType, new Field);
        });
        $this->app->singleton('soda.content-block.repository', function ($app) {
            return new ContentBlockRepository(new Content, new BlockType);
        });
        $this->app->singleton('soda.content.cached-repository', function ($app) {
            return new CachedPContent($app['soda.content.repository']);
        });
        $this->registerAliases($this->aliases);
        if ( config('soda.cms.enable_publish_date') ) {
            Content::setPublishDateField('published_at');
        }
    }
public function register ( ) { $ this -> registerDependencies ( [ ClosureTableServiceProvider :: class , ] ) ; $ this -> app -> singleton ( 'soda.content.repository' , function ( $ app ) { return new ContentRepository ( new Content ) ; } ) ; $ this -> app -> singleton ( 'soda.content-type.repository' , function ( $ app ) { return new ContentTypeRepository ( new ContentType ) ; } ) ; $ this -> app -> singleton ( 'soda.content-type-block.repository' , function ( $ app ) { return new ContentTypeBlockRepository ( new ContentType , new BlockType ) ; } ) ; $ this -> app -> singleton ( 'soda.content-type-field.repository' , function ( $ app ) { return new ContentTypeFieldRepository ( new ContentType , new Field ) ; } ) ; $ this -> app -> singleton ( 'soda.content-block.repository' , function ( $ app ) { return new ContentBlockRepository ( new Content , new BlockType ) ; } ) ; $ this -> app -> singleton ( 'soda.content.cached-repository' , function ( $ app ) { return new CachedPContent ( $ app [ 'soda.content.repository' ] ) ; } ) ; $ this -> registerAliases ( $ this -> aliases ) ; if ( config ( 'soda.cms.enable_publish_date' ) ) { Content :: setPublishDateField ( 'published_at' ) ; } }
Register bindings in the container.
Register bindings in the container .