/**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function destroy(BeasiswaCalonSiswa $beasiswa)
 {
     $beasiswa->delete();
     return json_encode(['success' => true, 'message' => 'Data berhasil dihapus']);
 }
Exemple #2
0
 public function getDelete(Psb $psb, Request $request)
 {
     OrangTuaCalonSiswa::where('calon_siswa_id', $psb->calonSiswa->id)->delete();
     AlamatCalonSiswa::where('calon_siswa_id', $psb->calonSiswa->id)->delete();
     PrestasiCalonSiswa::where('calon_siswa_id', $psb->calonSiswa->id)->delete();
     BeasiswaCalonSiswa::where('calon_siswa_id', $psb->calonSiswa->id)->delete();
     CalonSiswa::where('psb_id', $psb->id)->delete();
     $psb->delete();
     return $this->response($psb, $request);
 }