I have many to many related two tables, "roles" and "users" with pivot table as "user_roles".
In Role model
$this->belongsToMany('users', 'user_roles');
In User model
$this->belongsToMany('roles', 'user_roles');
Is this a valid relation?
You want a pivot table and a many to many relationship using a pivot table like you said.
What you are trying to do is explained in Laravel documentation - Eloquent