Code Duplication    Length = 9-11 lines in 2 locations

app/Http/Controllers/Customers/CustomerNotesController.php 1 location

@@ 77-85 (lines=9) @@
74
    }
75
76
    //  Delete a customer note
77
    public function destroy($id)
78
    {
79
        CustomerNotes::find($id)->delete();
80
        
81
        Log::debug('Route '.Route::currentRouteName().' visited by User ID-'.Auth::user()->user_id);
82
        Log::notice('Customer Note ID-'.$id.' deleted by User ID-'.Auth::user()->user_id);
83
        
84
        return response()->json(['success' => true]);
85
    }
86
}
87

app/Http/Controllers/FileLinks/FileLinksController.php 1 location

@@ 281-291 (lines=11) @@
278
    }
279
280
    //  Disable a file linke, but do not remove it (set the expire date to a previous date)
281
    public function disableLink($id)
282
    {
283
        //  update the expire date for the link
284
        FileLinks::find($id)->update([
285
            'expire' => Carbon::yesterday()
286
        ]);
287
288
        Log::info('User ID '.Auth::user()->user_id.' disabled link ID - '.$id);
289
        Log::debug('Route '.Route::currentRouteName().' visited by User ID-'.Auth::user()->user_id);
290
        return response()->json(['success' => true]);
291
    }
292
293
    //  Delete a file link
294
    public function destroy($id)