Commit 2eeb6361 authored by Taylor Otwell's avatar Taylor Otwell

changed $view->with to $view->nest.

parent 57d62f55
...@@ -306,13 +306,13 @@ class View { ...@@ -306,13 +306,13 @@ class View {
* *
* <code> * <code>
* // Add a view instance to a view's data * // Add a view instance to a view's data
* $view = View::make('foo')->partial('footer', 'partials.footer'); * $view = View::make('foo')->nest('footer', 'partials.footer');
* *
* // Equivalent functionality using the "with" method * // Equivalent functionality using the "with" method
* $view = View::make('foo')->with('footer', View::make('partials.footer')); * $view = View::make('foo')->with('footer', View::make('partials.footer'));
* *
* // Bind a view instance with data * // Bind a view instance with data
* $view = View::make('foo')->partial('footer', 'partials.footer', array('name' => 'Taylor')); * $view = View::make('foo')->nest('footer', 'partials.footer', array('name' => 'Taylor'));
* </code> * </code>
* *
* @param string $key * @param string $key
...@@ -320,7 +320,7 @@ class View { ...@@ -320,7 +320,7 @@ class View {
* @param array $data * @param array $data
* @return View * @return View
*/ */
public function partial($key, $view, $data = array()) public function nest($key, $view, $data = array())
{ {
return $this->with($key, $this->factory->make($view, $data)); return $this->with($key, $this->factory->make($view, $data));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment