我有一个名为的表,其中包含以groups_pivot下列:
id, pivot_id, group_id, model, creator_id, updater_id, created_at, updated_at
在其中我存储不同模型之间的关系和groups:
select * from groups_pivot;
id pivot_id group_id model creator_id updater_id created_at updated_at
1 1 1 App\Models\User 7 7 8/18/2019 22:09 8/18/2019 22:09
2 2 1 App\Models\User 1 1 8/18/2019 22:09 8/18/2019 22:09
3 3 2 App\Models\User 6 6 8/18/2019 22:09 8/18/2019 22:09
4 4 3 App\Models\User 2 2 8/18/2019 22:09 8/18/2019 22:09
但是当我在两者中运行此查询时Laravel,mySQLWorkbench我得到空响应:
select * from groups_pivot
where model = 'App\Models\User';
09:27:41 select * from groups_pivot where model = 'App\Models\User' LIMIT 0, 1000 0 row(s) returned 0.000 sec / 0.000 sec
这是什么魔法?没有错误,没有响应。我确定我的早晨很愚蠢,但我不明白为什么会这样。感谢您提供有关在哪里查找的任何建议。