response
<?php return response('Hello World', 200, $headers); return response()->json(['foo' => 'bar'], 200, $headers);
<?php 'root' => __DIR__, ]); return response()->download( Storage::disk('dusk-tmp')->path('download-target2.txt') ); }
<?php 'root' => __DIR__, ]); return response()->download( Storage::disk('dusk-tmp')->path('download-target2.txt'), 'download-target2.txt', ['Content-Type' => 'text/csv']
<?php 'root' => __DIR__, ]); return response()->download( Storage::disk('dusk-tmp')->path('download & target2.txt') ); }
<?php $lastModified = filemtime($file); return static::cachedFileResponse($file, $contentType, $lastModified, fn ($headers) => response()->file($file, $headers)); } static function pretendPreviewResponseIsPreviewFile($filename)
<?php $cacheControl = 'public, max-age=31536000'; if (static::matchesCache($lastModified)) { return response('', 304, [ 'Expires' => static::httpDate($expires), 'Cache-Control' => $cacheControl, ]); } $headers = [
<?php public function streamDownload($filename = null, $headers = []) { $this->downloaded = true; return response()->streamDownload(function () { echo 'alpinejs'; }, $filename, $headers); }
<?php $layoutConfig->normalizeViewNameAndParamsForBladeComponents(); $response = response(SupportPageComponents::renderContentsIntoLayout($html, $layoutConfig)); if (is_callable($layoutConfig->response)) { call_user_func($layoutConfig->response, $response);
<?php { if (static::$response) return; static::$response = response()->stream(null , 200, [ 'Cache-Control' => 'no-cache', 'Content-Type' => 'text/event-stream', 'X-Accel-Buffering' => 'no',