mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Add method that makes sure that URL's are expanded for page navigation/
This commit is contained in:
parent
22fdc81de2
commit
d3294be1bc
@ -61,6 +61,32 @@ class Controller extends BaseController
|
||||
$this->parameters = $this->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
protected function buildParams(): string
|
||||
{
|
||||
$return = '?';
|
||||
$params = [];
|
||||
foreach ($this->parameters as $key => $value) {
|
||||
if($key === 'page') {
|
||||
continue;
|
||||
}
|
||||
if ($value instanceof Carbon) {
|
||||
$params[$key] = $value->format('Y-m-d');
|
||||
}
|
||||
if (!$value instanceof Carbon) {
|
||||
$params[$key] = $value;
|
||||
}
|
||||
}
|
||||
$return .= http_build_query($params);
|
||||
if (strlen($return) === 1) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return ParameterBag
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user