Commit edbf7f3b by Taylor Otwell

added with method to view class.

parent c05ccc5d
......@@ -84,6 +84,18 @@ class View {
}
/**
* 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.
*
* @return string
......
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