Moved find() method to new class.

This commit is contained in:
James Cole
2016-10-10 07:12:39 +02:00
parent 7180a40cd8
commit 8ef7c5ac33
14 changed files with 99 additions and 80 deletions

View File

@@ -95,17 +95,16 @@ class AccountController extends Controller
/**
* @param ARI $repository
* @param AccountCrudInterface $crud
* @param Account $account
*
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
*/
public function destroy(ARI $repository, AccountCrudInterface $crud, Account $account)
public function destroy(ARI $repository, Account $account)
{
$type = $account->accountType->type;
$typeName = config('firefly.shortNamesByFullName.' . $type);
$name = $account->name;
$moveTo = $crud->find(intval(Input::get('move_account_before_delete')));
$moveTo = $repository->find(intval(Input::get('move_account_before_delete')));
$repository->destroy($account, $moveTo);