Laravel observer for pivot table
I've got a observer that has a update method: ObserverServiceProvider.php public function boot() { Relation::observe(RelationObserver::class); } RelationObserver.php public function updated(Relation $relation) { $this->cache->tags(Relation::class)->flush(); } So when I update a relation in my controller: public function update(Request $request, Relation $relation) { $relation->update($request->all())); return back(); } Everything is working as expected. But now I've got a pivot table. A relation belongsToMany products. So now my controller method looks like this: public function update(Request