Add attachment helper to relevant classes #2828

This commit is contained in:
James Cole
2020-03-19 08:58:55 +01:00
parent aceaf5f891
commit d489244c00
8 changed files with 65 additions and 2 deletions

View File

@@ -23,6 +23,7 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers;
use Carbon\Carbon;
use FireflyIII\Helpers\Attachments\AttachmentHelperInterface;
use FireflyIII\Http\Requests\PiggyBankFormRequest;
use FireflyIII\Models\PiggyBank;
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
@@ -55,6 +56,9 @@ class PiggyBankController extends Controller
/** @var PiggyBankRepositoryInterface Piggy bank repository. */
private $piggyRepos;
/** @var AttachmentHelperInterface Helper for attachments. */
private $attachments;
/**
* PiggyBankController constructor.
*
@@ -69,6 +73,7 @@ class PiggyBankController extends Controller
app('view')->share('title', (string) trans('firefly.piggyBanks'));
app('view')->share('mainTitleIcon', 'fa-sort-amount-asc');
$this->attachments = app(AttachmentHelperInterface::class);
$this->piggyRepos = app(PiggyBankRepositoryInterface::class);
$this->currencyRepos = app(CurrencyRepositoryInterface::class);
$this->accountRepos = app(AccountRepositoryInterface::class);