I am using voyager admin panel. I am trying to delete permission role, which already assigned to the user, then voyager give me an error:
2020-02-19 11:07:56] local.ERROR: SQLSTATE[23000]: Integrity constraint violation: 1451 Cannot delete or update a parent row: a foreign key constraint fails (
data_base_name
.users
, CONSTRAINTusers_role_id_foreign
FOREIGN KEY (role_id
) REFERENCESroles
(id
)) (SQL: delete fromroles
whereid
= 4)
voyager should show me a message that role can not delete its assigned to the user.