Platforms that move and carry the player

I’am trying to make a platform that moves horizontally and carries the player around. I copied the code from phaser’s website thats supposed to help me. but I get an error from the console that

this.platforms = this.add.physicsGroup();

is not a function

this is the rest of the code but it won’t run either

this.platforms.create(0, 64, ‘platform’);
this.platforms.create(200, 180, ‘platform’);
this.platforms.create(400, 296, ‘platform’);
this.platforms.create(600, 412, ‘platform’);

this.platforms.setAll(‘body.allowGravity’, false);
this.platforms.setAll(‘body.immovable’, true);
this.platforms.setAll(‘body.velocity.x’, 100);

With this information it is difficult to find out where the problem is.

You might want to download the full game source example from https://phaser.io/tutorials/making-your-first-phaser-3-game/part1 and play around with it.