public function update() { $appcodes = Appcodes::find(Input::get("id")); if (!$appcodes) { Session::flash('error', trans("appcodes.notifications.no_exists")); return Redirect::to("/appcodes/" . $appcodes->benefit_id); } $benefit_id = Input::has("benefit_id") ? Input::get("benefit_id") : ""; $number = Input::has("number") ? Input::get("number") : ""; $bar_code = "data:image/png;base64," . \DNS1D::getBarcodePNG($number, "C39+"); $client = Input::has("client") ? Input::get("client") : ""; $single_use = Input::has("single_use") ? Input::get("single_use") : ""; if ($number == "" || $bar_code == "" || $client == "" || $benefit_id == "") { Session::flash("error", trans("appcodes.notifications.field_name_missing")); return Redirect::to("/appcodes/{$appcodes->id}/edit")->withInput(); } $appcodes->benefit_id = $benefit_id; $appcodes->number = $number; $appcodes->bar_code = $bar_code; $appcodes->client = $client; $appcodes->single_use = $single_use; $appcodes->save(); Session::flash('success', trans("appcodes.notifications.update_successful")); return Redirect::to("/appcodes/" . $benefit_id); }
echo '<img src="data:image/png;base64,' . DNS1D::getBarcodePNG("{$item->barcode}", "EAN13", 1, 33) . '" alt="barcode" />'; ?> <!-- {!! DNS1D::getBarcodeHTML("$item->barcode", "UPCA", 1, 33)!!} --> <a style="font-size: 10px;">{!! $item->barcode !!}</a > <hr style="margin-top: 0px"> <p style="font-size: 10px; margin-top: -7px; text-align: left">{!! 'Rp. '.number_format($item->selling_price,'2',',','.') !!}</p> </td> </tr> </table> </div></td> <td><div class="barcode"> <table width="50"> <tr> <td align="center"> <?php echo '<img src="data:image/png;base64,' . DNS1D::getBarcodePNG("{$item->barcode}", "EAN13", 1, 33) . '" alt="barcode" />'; ?> <!-- {!! DNS1D::getBarcodeHTML("$item->barcode", "UPCA", 1, 33)!!} --> <a style="font-size: 10px;">{!! $item->barcode !!}</a > <hr style="margin-top: 0px"> <p style="font-size: 10px; margin-top: -7px; text-align: left">{!! 'Rp. '.number_format($item->selling_price,'2',',','.') !!}</p> </td> </tr> </table> </div></td> </tr> </table> <br />