Code Duplication    Length = 12-12 lines in 3 locations

src/Http/Controllers/JenisPrestasiController.php 1 location

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

src/Http/Controllers/MasterPrestasiController.php 1 location

@@ 283-294 (lines=12) @@
280
     * @param  \App\Prestasi  $prestasi
281
     * @return \Illuminate\Http\Response
282
     */
283
    public function destroy($id)
284
    {
285
        $master_prestasi = $this->master_prestasi->findOrFail($id);
286
287
        if ($master_prestasi->delete()) {
288
            $response['status'] = true;
289
        } else {
290
            $response['status'] = false;
291
        }
292
293
        return json_encode($response);
294
    }
295
}
296

src/Http/Controllers/PrestasiController.php 1 location

@@ 326-337 (lines=12) @@
323
     * @param  \App\Prestasi  $prestasi
324
     * @return \Illuminate\Http\Response
325
     */
326
    public function destroy($id)
327
    {
328
        $prestasi = $this->prestasi->findOrFail($id);
329
330
        if ($prestasi->delete()) {
331
            $response['status'] = true;
332
        } else {
333
            $response['status'] = false;
334
        }
335
336
        return json_encode($response);
337
    }
338
}
339