path(), '/'); if (str_starts_with($path, 'admin/') && config('buildadmin.auto_write_admin_log', true)) { $method = $request->method(); if ($method === 'POST' || $method === 'DELETE') { try { AdminLogModel::instance($request)->record(); } catch (\Throwable $e) { \support\Log::warning('[AdminLog] ' . $e->getMessage()); } } } return $response; } }