diff --git a/src/Response.php b/src/Response.php index 93adcc2..17056e1 100755 --- a/src/Response.php +++ b/src/Response.php @@ -278,6 +278,17 @@ public function redirect(string $url, int $status = 302) Headers::set('Location', $url, true, $status); } + + /** + * Pass data to the route handler + * + * @param mixed $data The data to pass + */ + public function next($data) + { + \Leaf\Config::set('middleware.data', $data); + } + /** * Force set HTTP status code *