laravel mySQL
I wanna loop through the table two columns and find the corresponding value in third column when the second input is found? This is the image of the table Jack is first input laura is second input loop have to start from jack and find the value from Relation column when it's found the laura(second input)