Browse Source

Render Responses when cast as string

Signed-off-by: Kelly Banman <kelly.banman@gmail.com>
Kelly Banman 12 years ago
parent
commit
338b74c142
1 changed files with 10 additions and 0 deletions
  1. 10 0
      laravel/response.php

+ 10 - 0
laravel/response.php

@@ -334,4 +334,14 @@ class Response {
 		}
 	}
 
+	/**
+	 * Render the response when cast to string
+	 *
+	 * @return string
+	 */
+	public function __toString()
+	{
+		return $this->render();
+	}
+
 }