Code Duplication    Length = 9-9 lines in 2 locations

app/Http/Controllers/UserController.php 1 location

@@ 168-176 (lines=9) @@
165
     * @param  string  $id
166
     * @return \Illuminate\Http\RedirectResponse
167
     */
168
    public function restore($id)
169
    {
170
        $user = User::onlyTrashed()->findOrFail($id);
171
172
        $user->restore();
173
        
174
        return redirect()->route('user.show', $user->id)
175
            ->with('success','User restored successfully');
176
    }
177
}
178

app/Http/Controllers/DeviceController.php 1 location

@@ 213-221 (lines=9) @@
210
     * @param  string  $id
211
     * @return \Illuminate\Http\RedirectResponse
212
     */
213
    public function restore($id)
214
    {
215
        $device = Device::onlyTrashed()->findOrFail($id);
216
217
        $device->restore();
218
        
219
        return redirect()->route('device.show', $device->id)
220
            ->with('success','Device restored successfully');
221
    }
222
}
223