public function insert($entity)
    {
        $eloquentModel = $this->getEloquentModel($entity);

        $this->updateRelations($eloquentModel, 'insert');

        $eloquentModel->save();

        $eloquentModel->afterSaving($entity, 'insert');
    }
public function insert($entity)
    {
        $eloquentModel = $this->getEloquentModel($entity);

        $this->updateRelations($eloquentModel, 'insert');

        $eloquentModel->save();

        $eloquentModel->afterSaving($entity, 'insert');
    }
public function insert ( $ entity ) { $ eloquentModel = $ this -> getEloquentModel ( $ entity ) ; $ this -> updateRelations ( $ eloquentModel , 'insert' ) ; $ eloquentModel -> save ( ) ; $ eloquentModel -> afterSaving ( $ entity , 'insert' ) ; }
Create an entity object.

@param object $entity
@return void
Create an entity object .