我有张叫的桌子
groups_pivot
有这些列:
id, pivot_id, group_id, model, creator_id, updater_id, created_at, updated_at
在IT中,我存储不同模型和
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
这是什么魔法?没有错误,没有响应。我肯定我今天早上过得很糟糕,但我不明白为什么要这样做。谢谢你对去哪里看的建议。