Skip to content

Commit 6a34559

Browse files
committed
Change the response argument order
1 parent 8ed4757 commit 6a34559

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/Response.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,20 @@
88

99
class Response implements Responsable
1010
{
11+
protected $component;
12+
protected $props;
1113
protected $rootView;
1214
protected $sharedProps;
1315
protected $version;
14-
protected $component;
15-
protected $props;
1616
protected $viewData = [];
1717

18-
public function __construct($rootView, $sharedProps = [], $version, $component, $props)
18+
public function __construct($component, $props, $rootView = 'app', $sharedProps = [], $version = null)
1919
{
20+
$this->component = $component;
21+
$this->props = $props;
2022
$this->rootView = $rootView;
2123
$this->sharedProps = $sharedProps;
2224
$this->version = $version;
23-
$this->component = $component;
24-
$this->props = $props;
2525
}
2626

2727
public function with($key, $value)

src/ResponseFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,6 @@ public function render($component, $props = [])
4848
}
4949
});
5050

51-
return new Response($this->rootView, $this->sharedProps, $this->getVersion(), $component, $props);
51+
return new Response($component, $props, $this->rootView, $this->sharedProps, $this->getVersion());
5252
}
5353
}

0 commit comments

Comments
 (0)