I tried creating a unit test for the relationships between my User and Shop models, however when I run vendor\\\\bin\\\\phpunit this e
User
Shop
vendor\\\\bin\\\\phpunit
You are assigning the id '2' to both shops.
Assigning is should not be neccessary since I assume the shop table id field is an autoincrement field.
Also look into database factories in the Laravel docs, it will simplify things for you.