From d4e2a0071a11dbaaa974356d755a7a602df3c0fe Mon Sep 17 00:00:00 2001 From: David Bomba Date: Wed, 7 Oct 2020 14:56:35 +1100 Subject: [PATCH] Analytics --- app/DataMapper/Analytics/AccountCreated.php | 49 +++++++++++++++++++ app/DataMapper/Analytics/AccountDeleted.php | 49 +++++++++++++++++++ app/Http/Controllers/CompanyController.php | 7 +++ app/Jobs/Account/CreateAccount.php | 15 ++++++ .../views/email/template/master.blade.php | 4 ++ 5 files changed, 124 insertions(+) create mode 100644 app/DataMapper/Analytics/AccountCreated.php create mode 100644 app/DataMapper/Analytics/AccountDeleted.php diff --git a/app/DataMapper/Analytics/AccountCreated.php b/app/DataMapper/Analytics/AccountCreated.php new file mode 100644 index 0000000000..67a50c68d4 --- /dev/null +++ b/app/DataMapper/Analytics/AccountCreated.php @@ -0,0 +1,49 @@ +delete(); + + LightLogs::create(new AccountDeleted()) + ->increment() + ->batch(); + } else { $company_id = $company->id; $company->delete(); diff --git a/app/Jobs/Account/CreateAccount.php b/app/Jobs/Account/CreateAccount.php index 794a275307..70b9d1be08 100644 --- a/app/Jobs/Account/CreateAccount.php +++ b/app/Jobs/Account/CreateAccount.php @@ -1,7 +1,17 @@ notification(new NewAccountCreated($spaa9f78, $sp035a66))->ninja(); + LightLogs::create(new AnalyticsAccountCreated()) + ->increment() + ->batch(); + return $sp794f3f; } } diff --git a/resources/views/email/template/master.blade.php b/resources/views/email/template/master.blade.php index cf44f3f416..7ca372a82f 100644 --- a/resources/views/email/template/master.blade.php +++ b/resources/views/email/template/master.blade.php @@ -13,7 +13,11 @@ if(!isset($design)) $design = 'light';