public function exportData($columns, $sessionKey = null) { $mhs = PendaftaranWisuda::all(); $mhs->each(function ($mhs) use($columns) { $mhs->addVisible($columns); }); return $mhs->toArray(); }
private function processFileUploadPhoto($id, $uploadedFile) { $file = new System\Models\File(); $file->data = $uploadedFile; $file->save(); $mhs = PendaftaranWisuda::find($id); $mhs->photo_ijazah()->add($file); }
public function index_onDelete() { if (($checkedIds = post('checked')) && is_array($checkedIds) && count($checkedIds)) { foreach ($checkedIds as $mahasiswaid) { if (!($mhs = Pendaftaran::find($mahasiswaid))) { continue; } $mhs->delete(); } Flash::success('Successfully deleted those Mahasiswa.'); } return $this->listRefresh(); }