mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-18 16:22:14 +00:00
backend notifications implementation
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace Domain\Notifications\Controllers;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Contracts\Foundation\Application;
|
||||
use Illuminate\Contracts\Routing\ResponseFactory;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class MarkUserNotificationsAsReadController extends Controller
|
||||
{
|
||||
public function __invoke(): Response|Application|ResponseFactory
|
||||
{
|
||||
if (is_demo_account()) {
|
||||
return response('Done', 204);
|
||||
}
|
||||
|
||||
// Mark all notifications as read
|
||||
auth()->user()->unreadNotifications()->update(['read_at' => now()]);
|
||||
|
||||
return response('Done', 204);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user