feat: implementation des logs de connexion et correction du chemin de stockage des documents

This commit is contained in:
jeremy bayse
2026-04-19 17:28:13 +02:00
parent f3d630d741
commit 205c24182d
12 changed files with 245 additions and 1 deletions

View File

@@ -0,0 +1,27 @@
<?php
namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Models\LoginLog;
use Inertia\Inertia;
class LoginLogController extends Controller
{
public function index()
{
if (!auth()->user()->isSuperAdmin()) {
abort(403, 'Unauthorized. Super Admin only.');
}
$logs = LoginLog::with('user.tenant')
->orderBy('login_at', 'desc')
->paginate(50);
return Inertia::render('Admin/Logs', [
'logs' => $logs
]);
}
}