rigidbody.velocity on local axis

I am trying to make the player move towards the way it’s facing, but even though it’s rotated it still moves relative to the global axis. how do i make it move relative to it’s local axis?
this is my code so far:

Vector2 direction = new Vector2 (); 
direction.x = Input.GetAxisRaw ("Horizontal"); 
direction.y = Input.GetAxisRaw ("Vertical"); 
direction.Normalize (); 
rig.velocity = direction * walkSpeed * runMultiplier * Time.deltaTime;

Try with:
Vector2 direction = new Vector2.up;
rig.velocity = direction * Time.deltaTime;

rig.velocity = gameObject.transform.InverseTransformDirection(direction)Time.deltaTimespeed;

something like this should help.