diff --git a/src/Illuminate/Routing/ResponseFactory.php b/src/Illuminate/Routing/ResponseFactory.php index 25af507c54bc..fa844774130e 100644 --- a/src/Illuminate/Routing/ResponseFactory.php +++ b/src/Illuminate/Routing/ResponseFactory.php @@ -70,7 +70,7 @@ public function noContent($status = 204, array $headers = []) /** * Create a new response for a given view. * - * @param string $view + * @param string|array $view * @param array $data * @param int $status * @param array $headers @@ -78,6 +78,10 @@ public function noContent($status = 204, array $headers = []) */ public function view($view, $data = [], $status = 200, array $headers = []) { + if (is_array($view)) { + return $this->make($this->view->first($view, $data), $status, $headers); + } + return $this->make($this->view->make($view, $data), $status, $headers); }