protected function bindEntities()
    {
        $entities = $this->app->config['entity'];

        foreach($entities as $e => $config){

            $this->app->bind("entity.$e", function ($app, $default) use ($config){

                return new $config['class'];

            });
        }
    }
protected function bindEntities()
    {
        $entities = $this->app->config['entity'];

        foreach($entities as $e => $config){

            $this->app->bind("entity.$e", function ($app, $default) use ($config){

                return new $config['class'];

            });
        }
    }
protected function bindEntities ( ) { $ entities = $ this -> app -> config [ 'entity' ] ; foreach ( $ entities as $ e => $ config ) { $ this -> app -> bind ( "entity.$e" , function ( $ app , $ default ) use ( $ config ) { return new $ config [ 'class' ] ; } ) ; } }
Bind all registered entities to the application so we can easily
instantiate them anywhere we need them.
Bind all registered entities to the application so we can easily instantiate them anywhere we need them .