Пример #1
0
 public function deleteData($id)
 {
     $data = Angsuran::findOrFail($id);
     $kode = $data->kode;
     $data->delete();
     return redirect('admin/angsuran/' . $kode);
 }
Пример #2
0
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function show($id, $idtransaksi)
 {
     $debitur = Debitur::findOrFail($id);
     $transaksi = Transaksi::findOrFail($idtransaksi);
     $angsuran = Angsuran::where('kode', $transaksi->kode)->orderBy('created_at', 'desc')->get();
     $data = Angsuran::where('kode', $transaksi->kode)->count();
     $tempo = $data + 1;
     return view('transaksi.show', compact('debitur', 'transaksi', 'angsuran', 'tempo'));
 }