added with method to view class.

This commit is contained in:
Taylor Otwell 2011-06-11 23:13:35 -05:00
parent c05ccc5d49
commit edbf7f3b0f

View File

@ -83,6 +83,18 @@ class View {
return $this;
}
/**
* Merge an array into the view data.
*
* @param array $data
* @return View
*/
public function with($data)
{
$this->data = array_merge($this->data, $data);
return $this;
}
/**
* Get the parsed content of the view.
*