Response.php 2.2KB

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. namespace Illuminate\Support\Facades;
  3. use Illuminate\Contracts\Routing\ResponseFactory as ResponseFactoryContract;
  4. /**
  5. * @method static \Illuminate\Http\Response make(string $content = '', int $status = 200, array $headers = [])
  6. * @method static \Illuminate\Http\Response view(string $view, array $data = [], int $status = 200, array $headers = [])
  7. * @method static \Illuminate\Http\JsonResponse json(string | array $data = [], int $status = 200, array $headers = [], int $options = 0)
  8. * @method static \Illuminate\Http\JsonResponse jsonp(string $callback, string | array $data = [], int $status = 200, array $headers = [], int $options = 0)
  9. * @method static \Symfony\Component\HttpFoundation\StreamedResponse stream(\Closure $callback, int $status = 200, array $headers = [])
  10. * @method static \Symfony\Component\HttpFoundation\StreamedResponse streamDownload(\Closure $callback, string | null $name = null, array $headers = [], string | null $disposition = 'attachment')
  11. * @method static \Symfony\Component\HttpFoundation\BinaryFileResponse download(\SplFileInfo | string $file, string | null $name = null, array $headers = [], string | null $disposition = 'attachment')
  12. * @method static \Illuminate\Http\RedirectResponse redirectTo(string $path, int $status = 302, array $headers = [], bool | null $secure = null)
  13. * @method static \Illuminate\Http\RedirectResponse redirectToRoute(string $route, array $parameters = [], int $status = 302, array $headers = [])
  14. * @method static \Illuminate\Http\RedirectResponse redirectToAction(string $action, array $parameters = [], int $status = 302, array $headers = [])
  15. * @method static \Illuminate\Http\RedirectResponse redirectGuest(string $path, int $status = 302, array $headers = [], bool | null $secure = null)
  16. * @method static \Illuminate\Http\RedirectResponse redirectToIntended(string $default = '/', int $status = 302, array $headers = [], bool | null $secure = null)
  17. *
  18. * @see \Illuminate\Contracts\Routing\ResponseFactory
  19. */
  20. class Response extends Facade
  21. {
  22. /**
  23. * Get the registered name of the component.
  24. *
  25. * @return string
  26. */
  27. protected static function getFacadeAccessor()
  28. {
  29. return ResponseFactoryContract::class;
  30. }
  31. }