mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-18 15:50:50 +08:00
[api] add notifications
This commit is contained in:
@@ -4,6 +4,7 @@ namespace App\Http\Controllers;
|
||||
|
||||
use App\Repositories\ToolRepository;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
class ToolController extends Controller
|
||||
{
|
||||
@@ -14,4 +15,11 @@ class ToolController extends Controller
|
||||
$this->repository = $repository;
|
||||
}
|
||||
|
||||
public function notifications(): array
|
||||
{
|
||||
$user = Auth::user();
|
||||
$result = $this->repository->getNotificationCount($user);
|
||||
return $this->success($result);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user