mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-29 18:20:01 +00:00
Add everything range
This commit is contained in:
@@ -6,9 +6,9 @@ namespace FireflyIII\Http\Middleware;
|
||||
use Carbon\Carbon;
|
||||
use Closure;
|
||||
use Illuminate\Contracts\Auth\Guard;
|
||||
use Navigation;
|
||||
use Preferences;
|
||||
use Session;
|
||||
use Navigation;
|
||||
|
||||
/**
|
||||
* Class SessionFilter
|
||||
@@ -59,6 +59,14 @@ class Range
|
||||
Session::put('start', $start);
|
||||
Session::put('end', $end);
|
||||
}
|
||||
if (!Session::has('first')) {
|
||||
$journal = $this->auth->user()->transactionjournals()->orderBy('date', 'ASC')->first(['transaction_journals.*']);
|
||||
if ($journal) {
|
||||
Session::put('first', $journal->date);
|
||||
} else {
|
||||
Session::put('first', Carbon::now());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user