feat: header con mensajes y notificaciones en tiempo real

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-26 14:14:46 -06:00
parent 9dd5ac6cbf
commit eaeedf2029
8 changed files with 298 additions and 149 deletions
+3 -1
View File
@@ -56,7 +56,9 @@ Route::middleware(['auth:sanctum',config('jetstream.auth_session'),'verified',
Route::get('/chat', [ChatController::class, 'index'])->name('chat.index');
Route::get('/chat/{user}', [ChatController::class, 'show'])->name('chat.show');
Route::post('/chat/send', [ChatController::class, 'send'])->name('chat.send');
Route::get('/files/{path}', [FileController::class, 'serve'])->where('path', '.*')->name('files.serve');Route::resource('/docente',DocenteController::class);
Route::get('/files/{path}', [FileController::class, 'serve'])->where('path', '.*')->name('files.serve');
Route::post('/notifications/{id}/read', fn($id) => auth()->user()->notifications()->findOrFail($id)->markAsRead())->name('notifications.read');
Route::post('/notifications/read-all', fn() => auth()->user()->unreadNotifications->markAsRead())->name('notifications.read-all');Route::resource('/docente',DocenteController::class);
Route::resource('/documento',DocumentoController::class);
Route::get('/documento/ver/{id}', function ($id) { $doc = Documento::findOrFail($id); $alumno = auth()->user()->alumnos()->first(); if (!$alumno || $doc->alumno_id !== $alumno->id) { abort(403); } return response()->file( storage_path('app/public/'.$doc->archivo) ); });
Route::get('/documento/ver/{id}', [DocumentoController::class, 'ver'])->name('documento.ver');