Skip to content

Commit 6ab7db3

Browse files
authored
Merge pull request #280 from bvipul/develop
Removing Email Templates module
2 parents aae971c + 76211ca commit 6ab7db3

File tree

43 files changed

+94
-1690
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+94
-1690
lines changed

app/Events/Backend/EmailTemplates/EmailTemplateDeleted.php

Lines changed: 0 additions & 26 deletions
This file was deleted.

app/Events/Backend/EmailTemplates/EmailTemplateUpdated.php

Lines changed: 0 additions & 26 deletions
This file was deleted.

app/Helpers/helpers.php

Lines changed: 8 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
<?php
22

3-
use App\Exceptions\GeneralException;
43
use App\Helpers\uuid;
5-
use App\Http\Utilities\SendEmail;
64
use App\Models\Notification\Notification;
75
use App\Models\Settings\Setting;
86
use Carbon\Carbon as Carbon;
@@ -145,38 +143,25 @@ function settings()
145143
}
146144
}
147145

148-
// Creating Notification
149146
if (!function_exists('createNotification')) {
150147
/**
151148
* create new notification.
152149
*
153150
* @param $message message you want to show in notification
154151
* @param $userId To Whom You Want To send Notification
155-
* @param $type type of notification (1 - dashboard, 2 - email, 3 - both) (by default 1)
156-
* @param $option associate array [ 'data' => $data, 'email_template_type' => $template_type ]
157152
*
158153
* @return object
159154
*/
160-
function createNotification($message, $userId, $type = 1, $options = [])
155+
function createNotification($message, $userId)
161156
{
162-
if ($type == 1 || $type == 3) {
163-
$notification = new Notification();
157+
$notification = new Notification();
164158

165-
return $notification->insert([
166-
'message' => $message,
167-
'user_id' => $userId,
168-
'type' => $type,
169-
'created_at' => Carbon::now(),
170-
]);
171-
}
172-
if ($type == 2 || $type == 3) {
173-
if (!empty($options['data']) && !empty($options['email_template_type'])) {
174-
$mail = new SendEmail();
175-
$emailResult = $mail->sendWithTemplate($options['data'], $options['email_template_type']);
176-
} else {
177-
throw new GeneralException('Invalid input given.option array shold contains data and email_template_type');
178-
}
179-
}
159+
return $notification->insert([
160+
'message' => $message,
161+
'user_id' => $userId,
162+
'type' => 1,
163+
'created_at' => Carbon::now(),
164+
]);
180165
}
181166
}
182167

app/Http/Breadcrumbs/Backend/Backend.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
require __DIR__.'/Access/Role.php';
1010
require __DIR__.'/Access/Permission.php';
1111
require __DIR__.'/Page.php';
12-
require __DIR__.'/Email_Template.php';
1312
require __DIR__.'/Setting.php';
1413
require __DIR__.'/Blog_Category.php';
1514
require __DIR__.'/Blog_Tag.php';

app/Http/Breadcrumbs/Backend/Email_Template.php

Lines changed: 0 additions & 16 deletions
This file was deleted.

app/Http/Controllers/Backend/EmailTemplates/EmailTemplatesController.php

Lines changed: 0 additions & 92 deletions
This file was deleted.

app/Http/Controllers/Backend/EmailTemplates/EmailTemplatesTableController.php

Lines changed: 0 additions & 52 deletions
This file was deleted.

app/Http/Controllers/Backend/NotificationController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
class NotificationController extends Controller
1313
{
1414
/**
15-
* @var EmailTemplateContract
15+
* @var \App\Repositories\Backend\Notification\NotificationRepository
1616
*/
1717
protected $notification;
1818

app/Http/Requests/Backend/EmailTemplates/DeleteEmailTemplatesRequest.php

Lines changed: 0 additions & 33 deletions
This file was deleted.

app/Http/Requests/Backend/EmailTemplates/EditEmailTemplatesRequest.php

Lines changed: 0 additions & 33 deletions
This file was deleted.

0 commit comments

Comments
 (0)