Skip to content

Commit c7397aa

Browse files
committed
feat: add response::next method
1 parent c506a57 commit c7397aa

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/Response.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,17 @@ public function redirect(string $url, int $status = 302)
278278
Headers::set('Location', $url, true, $status);
279279
}
280280

281+
282+
/**
283+
* Pass data to the route handler
284+
*
285+
* @param mixed $data The data to pass
286+
*/
287+
public function next($data)
288+
{
289+
\Leaf\Config::set('middleware.data', $data);
290+
}
291+
281292
/**
282293
* Force set HTTP status code
283294
*

0 commit comments

Comments
 (0)