Pagination on the list, optional auth
This commit is contained in:
+2
-10
@@ -26,15 +26,7 @@ function url(?string $name = null, $parameters = null, ?array $getParams = null)
|
||||
return Router::getUrl($name, $parameters, $getParams);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $url
|
||||
* @param int|null $code
|
||||
*/
|
||||
function redirect(string $url, ?int $code = null): void
|
||||
function constrain(int $min, int $max, $n): int
|
||||
{
|
||||
if ($code !== null) {
|
||||
response()->httpCode($code);
|
||||
}
|
||||
|
||||
response()->redirect($url);
|
||||
return max(min($max, $n), $min);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user