Browse Source

Merge pull request #743 from kbanman/response-fix

Render Response objects when casting as string
Taylor Otwell 12 years ago
parent
commit
1b71a0ed89
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();
+	}
+
 }
 }