Advertisement
febripratama

last_date

May 24th, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.27 KB | None | 0 0
  1. <?php
  2.  
  3. $tgl_jatuh_prev = DB::table('kartu')->where('pinjaman_id', $request->nasabah_id)->orderBy('tgl_jatuhtmpo', 'desc')->first();
  4. $tgl_jatuh_next = is_object($tgl_jatuh_prev) ? Carbon::parse($tgl_jatuh_prev->tgl_jatuhtmpo)->addMonth(1) : date("Y-m-d");
  5.  
  6. // insert ke db
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement