When I import the index everything works fine (including relations).
The problem is that the main model does not watch over relations.
When I update a relation, the index is not updated too.
Is there any way to use something similar with Cache::tags
to update the index when a relation is modified? Or maybe is another way.
*Many
relationships, e.g.belongsToMany
. There was an attempt to fix this for 5.1, but this still seems to be an issue as of 5.6: github.com/laravel/framework/pull/19275 – Engedi