浏览代码

Update NotificationService

Daniel Supernault 6 年之前
父节点
当前提交
d09b00a70f
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/Services/NotificationService.php

+ 1 - 1
app/Services/NotificationService.php

@@ -73,7 +73,7 @@ class NotificationService {
 	public static function getNotification($id)
 	{
 		return Cache::remember('service:notification:'.$id, now()->addDays(7), function() use($id) {
-			$n = Notification::findOrFail($id);
+			$n = Notification::with('item')->findOrFail($id);
 			$fractal = new Fractal\Manager();
 			$fractal->setSerializer(new ArraySerializer());
 			$resource = new Fractal\Resource\Item($n, new NotificationTransformer());