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
@@ -50,7 +50,7 @@ class IntroductionsController extends Controller
}
try {
(new DestroyReminder)->execute([
app(DestroyReminder::class)->execute([
'account_id' => $contact->account_id,
'reminder_id' => $contact->first_met_reminder_id,
]);
@@ -61,7 +61,7 @@ class IntroductionsController extends Controller
$specialDate = $contact->setSpecialDate('first_met', $request->input('first_met_year'), $request->input('first_met_month'), $request->input('first_met_day'));
if ($request->addReminder == 'on') {
(new CreateReminder)->execute([
app(CreateReminder::class)->execute([
'account_id' => $contact->account_id,
'contact_id' => $contact->id,
'initial_date' => $specialDate->date->toDateString(),