Code Duplication    Length = 9-9 lines in 2 locations

app/Http/Controllers/DeviceController.php 1 location

@@ 225-233 (lines=9) @@
222
     * @param  string  $id
223
     * @return \Illuminate\Http\RedirectResponse
224
     */
225
    public function restore($id)
226
    {
227
        $device = Device::onlyTrashed()->findOrFail($id);
228
229
        $device->restore();
230
        
231
        return redirect()->route('device.show', $device->id)
232
            ->with('success','Device restored successfully');
233
    }
234
}
235

app/Http/Controllers/UserController.php 1 location

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