Code Duplication    Length = 12-12 lines in 2 locations

src/Http/Controllers/AkademikController.php 1 location

@@ 244-255 (lines=12) @@
241
     * @param  \App\Nilai  $nilai
242
     * @return \Illuminate\Http\Response
243
     */
244
    public function destroy($id)
245
    {
246
        $nilai = $this->nilai->findOrFail($id);
247
248
        if ($nilai->delete()) {
249
            $response['status'] = true;
250
        } else {
251
            $response['status'] = false;
252
        }
253
254
        return json_encode($response);
255
    }
256
}
257

src/Http/Controllers/NilaiController.php 1 location

@@ 260-271 (lines=12) @@
257
     * @param  \App\Nilai  $nilai
258
     * @return \Illuminate\Http\Response
259
     */
260
    public function destroy($id)
261
    {
262
        $nilai = $this->nilai->findOrFail($id);
263
264
        if ($nilai->delete()) {
265
            $response['status'] = true;
266
        } else {
267
            $response['status'] = false;
268
        }
269
270
        return json_encode($response);
271
    }
272
}
273