Code Duplication    Length = 12-12 lines in 3 locations

src/Http/Controllers/JenisPrestasiController.php 1 location

@@ 226-237 (lines=12) @@
223
     * @param  \App\Prestasi  $prestasi
224
     * @return \Illuminate\Http\Response
225
     */
226
    public function destroy($id)
227
    {
228
        $jenis_prestasi = $this->jenis_prestasi->findOrFail($id);
229
230
        if ($jenis_prestasi->delete()) {
231
            $response['status'] = true;
232
        } else {
233
            $response['status'] = false;
234
        }
235
236
        return json_encode($response);
237
    }
238
}
239

src/Http/Controllers/MasterPrestasiController.php 1 location

@@ 271-282 (lines=12) @@
268
     * @param  \App\Prestasi  $prestasi
269
     * @return \Illuminate\Http\Response
270
     */
271
    public function destroy($id)
272
    {
273
        $master_prestasi = $this->master_prestasi->findOrFail($id);
274
275
        if ($master_prestasi->delete()) {
276
            $response['status'] = true;
277
        } else {
278
            $response['status'] = false;
279
        }
280
281
        return json_encode($response);
282
    }
283
}
284

src/Http/Controllers/PrestasiController.php 1 location

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