mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Added magic words "currentMonthEnd" and "currentMonthStart".
This commit is contained in:
parent
59fff8928b
commit
f5cbed7c0c
@ -32,6 +32,14 @@ class Date implements BinderInterface
|
|||||||
*/
|
*/
|
||||||
public static function routeBinder($value, $route)
|
public static function routeBinder($value, $route)
|
||||||
{
|
{
|
||||||
|
if($value === 'currentMonthStart') {
|
||||||
|
return Carbon::now()->startOfMonth();
|
||||||
|
}
|
||||||
|
if($value === 'currentMonthEnd') {
|
||||||
|
return Carbon::now()->endOfMonth();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$date = new Carbon($value);
|
$date = new Carbon($value);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
|
@ -95,8 +95,8 @@
|
|||||||
<li>
|
<li>
|
||||||
<a href="{{ route('reports.report',
|
<a href="{{ route('reports.report',
|
||||||
['default',
|
['default',
|
||||||
startOfMonth.format('Ymd'),
|
'currentMonthStart',
|
||||||
endOfMonth.format('Ymd'),
|
'currentMonthEnd',
|
||||||
accountList
|
accountList
|
||||||
]) }}">{{ 'report_this_month_quick'|_ }}</a>
|
]) }}">{{ 'report_this_month_quick'|_ }}</a>
|
||||||
</li>
|
</li>
|
||||||
|
Loading…
Reference in New Issue
Block a user