Mpociot\Firebase\SyncsWithFirebase::bootSyncsWithFirebase PHP Method

bootSyncsWithFirebase() public static method

Boot the trait and add the model events to synchronize with firebase
public static bootSyncsWithFirebase ( )
    public static function bootSyncsWithFirebase()
    {
        static::created(function ($model) {
            $model->saveToFirebase('set');
        });
        static::updated(function ($model) {
            $model->saveToFirebase('update');
        });
        static::deleted(function ($model) {
            $model->saveToFirebase('delete');
        });
    }