Fixed some initial startup bugs when working with Homestead.

This commit is contained in:
Sander Dorigo 2014-11-11 07:20:52 +01:00
parent e9afd55e9d
commit 9d4cba1620
2 changed files with 27 additions and 22 deletions

View File

@ -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());

View File

@ -37,11 +37,12 @@ $app = new Illuminate\Foundation\Application;
|
*/
$env = $app->detectEnvironment(array(
'local' => array('homestead', 'SMJD*'),
));
$env = $app->detectEnvironment(
[
'local' => ['SMJD*'],
'homestead' => ['homestead']
]
);
/*