How to control a DC Motor with Hall Encoder using Arduino and Motor Driver?
What are the "m1" and "m2" pins you mention?

On the diagram I see on that link, the pins "1-M1 motor -" and "6-M1 motor +" should be connected to the motor driver. The other four pins should go to the Arduino only.

You can probably test the motor by disconnecting it and connecting pins 1 and 6 to a 9-12V battery or similar, to see if it turns.

By the way I guess the two Encoder Phase connections would be set up on the Arduino using PinMode setting "INPUT_PULLUP". But as you can already read the positions, that part may not matter.