Correção no endpoint notify
This commit is contained in:
parent
fc644fa221
commit
00c0181dce
@ -62,6 +62,6 @@ class NotificationController extends Controller
|
|||||||
{
|
{
|
||||||
$response = $this->notification->getNotify();
|
$response = $this->notification->getNotify();
|
||||||
|
|
||||||
return ResponseJson::data($response);
|
return response()->json($response);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -17,7 +17,9 @@ class NotificationRepository extends AbstractRepository implements NotificationC
|
|||||||
|
|
||||||
public function getNotify(): int
|
public function getNotify(): int
|
||||||
{
|
{
|
||||||
return Notifications::query()->with('users')
|
return Notifications::query()
|
||||||
->whereRelation('users', 'id', '=', auth()->id())->count();
|
->with('users')
|
||||||
|
->whereRelation('users', 'id', '=', auth()->id())
|
||||||
|
->count();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user