Skip to content

Commit

Permalink
Remove Laravel helpers dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
Stolz committed Mar 22, 2020
1 parent 31fc948 commit 29a108c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Middleware.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php namespace Stolz\HtmlTidy;

use Illuminate\Support\Str;
use Symfony\Component\HttpFoundation\BinaryFileResponse;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\RedirectResponse;
Expand Down Expand Up @@ -44,7 +45,7 @@ public function handle($request, \Closure $next)

// If response is HTML parse it
$contentType = $response->headers->get('content-type');
if(str_contains($contentType, 'text/html'))
if(Str::contains($contentType, 'text/html'))
$response->setContent(app('stolz.tidy')->parse($response->getContent()));

return $response;
Expand Down

0 comments on commit 29a108c

Please sign in to comment.