/** * @param After $flow */ protected function rememberResult(After $flow) { $cacheGroup = $this->getCacheGroup($flow->getRepository()); $cacheId = $this->getCacheId($flow->getRepository(), $flow->getAction()); $cacheKey = $cacheGroup . $cacheId; $this->setCache($cacheKey, $flow->getReturn()); }
/** * @param After $flow */ public function handle(After $flow) { $returnResult = $flow->getReturn(); if ($returnResult instanceof Arrayable) { $flow->setReturn($returnResult->toArray()); } }