add reverb container, unread attribute in notification pivot table and private channel and event for new register
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Events\UserCreated;
|
||||
use App\Models\Notification;
|
||||
use App\Models\User;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
@@ -51,6 +52,10 @@ class UserController extends Controller
|
||||
$admins->pluck('id')->toArray()
|
||||
);
|
||||
|
||||
Log::info('Broadcasting UserCreated event', ['user_id' => $user->id]);
|
||||
broadcast(new UserCreated($user));
|
||||
Log::info('Event broadcasted');
|
||||
|
||||
return response()->json(['message' => 'User created successfully']);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user