mirror of
https://github.com/Intervention/image.git
synced 2025-09-01 09:52:59 +02:00
Merge pull request #925 from TiGR/patch-1
Add support for Symfony Response creation
This commit is contained in:
@@ -57,6 +57,12 @@ class Response
|
||||
$response->header('Content-Type', $mime);
|
||||
$response->header('Content-Length', $length);
|
||||
|
||||
} elseif (class_exists(\Symfony\Component\HttpFoundation\Response::class)) {
|
||||
|
||||
$response = \Symfony\Component\HttpFoundation\Response::create($data);
|
||||
$response->headers->set('Content-Type', $mime);
|
||||
$response->headers->set('Content-Length', $length);
|
||||
|
||||
} else {
|
||||
|
||||
header('Content-Type: ' . $mime);
|
||||
|
Reference in New Issue
Block a user