We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents cd1cf07 + 29a108c commit 1498816Copy full SHA for 1498816
src/Middleware.php
@@ -1,5 +1,6 @@
1
<?php namespace Stolz\HtmlTidy;
2
3
+use Illuminate\Support\Str;
4
use Symfony\Component\HttpFoundation\BinaryFileResponse;
5
use Symfony\Component\HttpFoundation\JsonResponse;
6
use Symfony\Component\HttpFoundation\RedirectResponse;
@@ -44,7 +45,7 @@ public function handle($request, \Closure $next)
44
45
46
// If response is HTML parse it
47
$contentType = $response->headers->get('content-type');
- if(str_contains($contentType, 'text/html'))
48
+ if(Str::contains($contentType, 'text/html'))
49
$response->setContent(app('stolz.tidy')->parse($response->getContent()));
50
51
return $response;
0 commit comments