Merge branch 'master' of https://gitlab.com/kluppsoftware/smart-energia-api
This commit is contained in:
commit
0ec70c9ae6
@ -62,6 +62,6 @@ class NotificationController extends Controller
|
||||
{
|
||||
$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
|
||||
{
|
||||
return Notifications::query()->with('users')
|
||||
->whereRelation('users', 'id', '=', auth()->id())->count();
|
||||
return Notifications::query()
|
||||
->with('users')
|
||||
->whereRelation('users', 'id', '=', auth()->id())
|
||||
->count();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user