authorize('viewAny', Log::class); $log = Log::cursorPaginate(15); return response()->json(['data' => $log]); } public function getLogsStudent($id): JsonResponse { $this->authorize('viewAny', Log::class); $logs = Log::where('actor_id', $id)->whereRaw('LOWER(actor) = ?', ['student'])->cursorPaginate(15); return response()->json(['data' => $logs]); } public function getLogsCompany($id): JsonResponse { $this->authorize('viewAny', Log::class); $logs = Log::where('actor_id', $id)->whereRaw('LOWER(actor) = ?', ['company'])->cursorPaginate(15); return response()->json(['data' => $logs]); } public function getLogsAdmin($id): JsonResponse { $this->authorize('viewAny', Log::class); $logs = Log::where('actor_id', $id)->whereRaw('LOWER(actor) = ?', ['admin'])->cursorPaginate(15); return response()->json(['data' => $logs]); } }