Skip to content

Commit

Permalink
Merge pull request #280 from MarGul/chainRootView
Browse files Browse the repository at this point in the history
Ability to chain the root view
  • Loading branch information
reinink authored Jul 30, 2021
2 parents 810e583 + 67c4e04 commit 3a08d87
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@ public function withViewData($key, $value = null)
return $this;
}

public function rootView($rootView)
{
$this->rootView = $rootView;

return $this;
}

public function toResponse($request)
{
$only = array_filter(explode(',', $request->header('X-Inertia-Partial-Data')));
Expand Down

0 comments on commit 3a08d87

Please sign in to comment.