app->bind( 'FireflyIII\Repositories\Account\AccountRepositoryInterface', function (Application $app, array $arguments) { if (!isset($arguments[0]) && Auth::check()) { return app('FireflyIII\Repositories\Account\AccountRepository', [Auth::user()]); } else { if (!isset($arguments[0]) && !Auth::check()) { throw new FireflyException('There is no user present.'); } } return app('FireflyIII\Repositories\Account\AccountRepository', $arguments); } ); } }