Do you have the roles available as an array in inertia? And do the pluck in the method and pass it to inertia as userRoles (or pass it through useForm)
{
roles.map((role) => {
return (
<input type="checkbox"
checked={userRoles.includes(role.id)}
/>
}
}
If you have it in useForm
checked={data.roles.includes(role.id)}