Taks 4 - belongsToMany pivot

This commit is contained in:
PovilasKorop
2021-11-22 07:47:31 +02:00
parent 0fbdf0c99a
commit 4ec2014369
8 changed files with 128 additions and 0 deletions
+8
View File
@@ -51,3 +51,11 @@ Test method `test_show_users_comments()`.
---
## Task 4. BelongsToMany - Pivot Table Name.
In the route `/roles`, the table should load the roles with the number of users belonging to them. But the relationship in `app/Models/Role.php` model is defined incorrectly, fix that relationship definition.
Test method `test_show_roles_with_users()`.
---