feat: register all app services as singleton (#2337)

This commit is contained in:
Alexis Saettler
2019-01-25 15:56:35 +01:00
committed by GitHub
parent 9b3fd15d94
commit f660c4fd98
106 changed files with 309 additions and 271 deletions
+4 -4
View File
@@ -126,7 +126,7 @@ class SettingsController
);
if ($user->email != $request->get('email')) {
(new EmailChange)->execute([
app(EmailChange::class)->execute([
'account_id' => $user->account_id,
'email' => $request->get('email'),
'user_id' => $user->id,
@@ -151,7 +151,7 @@ class SettingsController
$user = $request->user();
$account = $user->account;
(new DestroyAllDocuments)->execute([
app(DestroyAllDocuments::class)->execute([
'account_id' => $account->id,
]);
@@ -192,7 +192,7 @@ class SettingsController
$user = $request->user();
$account = $user->account;
(new DestroyAllDocuments)->execute([
app(DestroyAllDocuments::class)->execute([
'account_id' => $account->id,
]);
@@ -481,7 +481,7 @@ class SettingsController
*/
public function deleteTag($tagId)
{
(new DestroyTag)->execute([
app(DestroyTag::class)->execute([
'tag_id' => $tagId,
'account_id' => auth()->user()->account->id,
]);