initial commit

This commit is contained in:
2026-09-23 12:45:02 +07:00
parent d16f454083
commit 507fc6ccdf
235 changed files with 19587 additions and 2835 deletions
+5 -4
View File
@@ -29,10 +29,12 @@ class UserController extends Controller
Gate::authorize('check-access', ['users', 'read']);
$users = User::query()
->with('role')
->with('roleModel')
->when($request->search, function ($query, $search) {
$query->where('name', 'like', "%{$search}%")
$query->where(function ($q) use ($search) {
$q->where('name', 'like', "%{$search}%")
->orWhere('email', 'like', "%{$search}%");
});
})
->latest()
->paginate(10);
@@ -194,7 +196,6 @@ class UserController extends Controller
public function clearLogs()
{
Gate::authorize('check-access', ['logs', 'delete']);
ActivityLog::truncate();
return back()->with('success', 'Seluruh riwayat aktivitas telah dibersihkan.');
return back()->with('error', 'Penghapusan massal audit trail dinonaktifkan untuk menjaga jejak perubahan data. Gunakan kebijakan retensi/arsip bila diperlukan.');
}
}