mirror of
https://github.com/laravel/laravel.git
synced 2025-02-20 11:53:14 +08:00
added with method to view class.
This commit is contained in:
parent
c05ccc5d49
commit
edbf7f3b0f
@ -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.
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user