@@ -74,6 +74,7 @@ protected function dataCleanUp(array $data): array
7474 */
7575 protected function get (string $ route , array $ data = [], array $ replace = []): Response
7676 {
77+ $ data = array_merge ($ replace , $ data );
7778 $ route = $ this ->makeReplacements ($ route , $ replace );
7879 $ route = str_replace ('{path} ' , 'app/Models ' , $ route );
7980 $ data = $ this ->dataCleanUp ($ data );
@@ -86,6 +87,7 @@ protected function get(string $route, array $data = [], array $replace = []): Re
8687 */
8788 protected function post (string $ route , array $ data = [], array $ replace = [], string $ method = 'post ' ): Response
8889 {
90+ $ data = array_merge ($ replace , $ data );
8991 $ route = $ this ->makeReplacements ($ route , $ replace );
9092 $ data = $ this ->dataCleanUp ($ data );
9193
@@ -97,6 +99,7 @@ protected function post(string $route, array $data = [], array $replace = [], st
9799 */
98100 protected function patch (string $ route , array $ data = [], array $ replace = []): Response
99101 {
102+ $ data = array_merge ($ replace , $ data );
100103 return $ this ->post ($ route , $ data , $ replace , __FUNCTION__ );
101104 }
102105
@@ -105,6 +108,7 @@ protected function patch(string $route, array $data = [], array $replace = []):
105108 */
106109 protected function put (string $ route , array $ data = [], array $ replace = []): Response
107110 {
111+ $ data = array_merge ($ replace , $ data );
108112 return $ this ->post ($ route , $ data , $ replace , __FUNCTION__ );
109113 }
110114
@@ -113,6 +117,7 @@ protected function put(string $route, array $data = [], array $replace = []): Re
113117 */
114118 protected function delete (string $ route , $ data = [], array $ replace = []): Response
115119 {
120+ $ data = array_merge ($ replace , $ data );
116121 return $ this ->post ($ route , $ data , $ replace , __FUNCTION__ );
117122 }
118123}
0 commit comments