mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Fixed some initial startup bugs when working with Homestead.
This commit is contained in:
parent
e9afd55e9d
commit
9d4cba1620
@ -18,11 +18,15 @@ class GoogleChartController extends BaseController
|
||||
|
||||
/** @var \FireflyIII\Shared\Preferences\Preferences $preferences */
|
||||
$preferences = App::make('FireflyIII\Shared\Preferences\Preferences');
|
||||
$pref = $preferences->get('frontpageAccounts');
|
||||
$pref = $preferences->get('frontpageAccounts', []);
|
||||
|
||||
/** @var \FireflyIII\Database\Account $acct */
|
||||
$acct = App::make('FireflyIII\Database\Account');
|
||||
if (count($pref->data) > 0) {
|
||||
$accounts = $acct->getByIds($pref->data);
|
||||
} else {
|
||||
$accounts = $acct->getAssetAccounts();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
@ -206,7 +210,8 @@ class GoogleChartController extends BaseController
|
||||
*
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function componentsAndSpending(Component $component, $year) {
|
||||
public function componentsAndSpending(Component $component, $year)
|
||||
{
|
||||
try {
|
||||
$start = new Carbon('01-01-' . $year);
|
||||
} catch (Exception $e) {
|
||||
@ -245,7 +250,6 @@ class GoogleChartController extends BaseController
|
||||
}
|
||||
|
||||
|
||||
|
||||
$chart->generate();
|
||||
return Response::json($chart->getData());
|
||||
|
||||
|
@ -37,11 +37,12 @@ $app = new Illuminate\Foundation\Application;
|
||||
|
|
||||
*/
|
||||
|
||||
$env = $app->detectEnvironment(array(
|
||||
|
||||
'local' => array('homestead', 'SMJD*'),
|
||||
|
||||
));
|
||||
$env = $app->detectEnvironment(
|
||||
[
|
||||
'local' => ['SMJD*'],
|
||||
'homestead' => ['homestead']
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user