Skip to content

Commit

Permalink
feat: add response::next method
Browse files Browse the repository at this point in the history
  • Loading branch information
mychidarko committed Oct 1, 2024
1 parent c506a57 commit c7397aa
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand Down

0 comments on commit c7397aa

Please sign in to comment.