Code Duplication    Length = 10-10 lines in 2 locations

app/Http/Controllers/Admin/helpdesk/SettingsController.php 1 location

@@ 745-754 (lines=10) @@
742
     *
743
     * @return type redirect
744
     */
745
    public function deleteReadNoti()
746
    {
747
        $markasread = UserNotification::where('is_read', '=', 1)->get();
748
        foreach ($markasread as $mark) {
749
            $mark->delete();
750
            \App\Model\helpdesk\Notification\Notification::whereId($mark->notification_id)->delete();
751
        }
752
753
        return redirect()->back()->with('success', Lang::get('lang.you_have_deleted_all_the_read_notifications'));
754
    }
755
756
    /**
757
     * delete a notification log.

app/Http/Controllers/Admin/helpdesk/SettingsController2.php 1 location

@@ 72-81 (lines=10) @@
69
        return view('themes.default1.admin.helpdesk.settings.notification');
70
    }
71
72
    public function deleteReadNoti()
73
    {
74
        $markasread = UserNotification::where('is_read', '=', 1)->get();
75
        foreach ($markasread as $mark) {
76
            $mark->delete();
77
            \App\Model\helpdesk\Notification\Notification::whereId($mark->notification_id)->delete();
78
        }
79
80
        return redirect()->back()->with('success', 'You have deleted all the read notifications');
81
    }
82
83
    public function deleteNotificationLog()
84
    {