Browse Source

Updating docs.

Taylor Otwell 12 years ago
parent
commit
a7959ebc3d
1 changed files with 8 additions and 0 deletions
  1. 8 0
      laravel/documentation/views/home.md

+ 8 - 0
laravel/documentation/views/home.md

@@ -58,6 +58,14 @@ Sometimes you will need a little more control over the response sent to the brow
 
 	return Response::view('home', 200, $headers);
 
+#### Returning a JSON response:
+
+	return Response::json(array('name' => 'Batman'));
+
+#### Returning Eloquent models as JSON:
+
+	return Response::eloquent(User::find(1));
+
 <a name="binding-data-to-views"></a>
 ## Binding Data To Views