', '1 or 1=1', str_repeat('9', 80), '٠١٢٣', 'null', '[]']; foreach (array_slice($this->apiRoutes(), 0, 80) as $route) { if (! str_contains($route->uri(), '{')) { continue; } $method = $this->primaryMethod($route); foreach (array_slice($poisoned, 0, 4) as $value) { $path = '/'.preg_replace('/\{[^}]+\}/', $value, $route->uri()); $this->actingAs($this->actorFor($route->uri()), 'api'); $response = $this->json($method, $path, $this->payloadFor($method, $route->uri())); $this->assertControlled($response, $method, $route->uri()); $this->assertStringNotContainsString('laravel.log', strtolower($response->getContent())); } } } }