Monthly Archive: October 2015

all 2

Kuliah tugas seminggu sewa kios menggunakan pascal

program seminggu_sewa_kios; uses crt,sysutils; const h_ayambakar = 15000; h_ayamgoreng = 14000; h_sopiga = 25000; h_sotoayam = 10000; h_mieayam = 9000; h_bakso = 10000; h_siomay = 8000; h_batagor = 8000; h_indomierebus = 7000; h_gorengan =...

0

PHP Laravel save data dengan upload file

$gambar = “”; $divisi = new Divisi; $divisi->nama = Input::get(‘nama’); if(Input::hasFile(‘gambar’) and Input::file(‘gambar’)->isValid()){ $gambar = date(“YmdHis”) .uniqid() .”.” .Input::file(‘gambar’)->getClientOriginalExtension(); Input::file(‘gambar’)->move(storage_path().’/gambardivisi’,$gambar); } $divisi->gambar = $gambar; $divisi->keterangan = Input::get(‘keterangan’); $divisi->save();

0

PHP Laravel update data dengan upload file

$gambar = “”; $divisi = Divisi::where(‘id’,Input::get(‘id’))->first(); $divisi->nama = Input::get(‘nama’); if(Input::hasFile(‘gambar’) and Input::file(‘gambar’)->isValid()){ $gambar = date(“YmdHis”) .uniqid() .”.” .Input::file(‘gambar’)->getClientOriginalExtension(); Input::file(‘gambar’)->move(storage_path().’/gambardivisi’,$gambar); $divisi->gambar = $gambar; } $divisi->keterangan = Input::get(‘keterangan’); $divisi->save();