Skip to content

Instantly share code, notes, and snippets.

View renopaslah's full-sized avatar

Reno Paslah renopaslah

  • Utama Nilam Sejahtera
  • Pekanbaru
View GitHub Profile
@renopaslah
renopaslah / gist:9c13865f9df0e0ffacd3398d88313859
Last active February 28, 2021 01:34
test_upload_image_proses
public function test_upload_image_proses()
{
// Start loading
$awal = microtime(true);
// Pengolahan file image
$inputFileName = base_url('/upload/files/test.png');
$data = file_get_contents($inputFileName);
// Menghitung waktu load
@renopaslah
renopaslah / Cashier.php
Created November 9, 2020 10:13
Filters no-respon
<?php namespace App\Controllers;
class Cashier extends BaseController
{
protected $model;
public function __construct()
{
// $this->model = new Hrd_model();
// ===== CONTROLLER::SAVE
public function save()
{
// Proses validasi
if(!$this->validate($this->model->validationRulesIU())){
$validation = \Config\Services::validation();
return redirect()->to('/setting/level')->withInput()->with('validation', $validation);
}
@renopaslah
renopaslah / gist:3a0c89ae59f17f704be9ab3d1bfd1cb0
Last active September 23, 2019 10:00
Autonumeric Problem
$('.addPriceRow').click(function(){
new_row = '<tr>';
new_row += '<td>3</td>';
new_row += '<td><button class="btn btn-warning btn-sm" type="button" name="button"> <i class="fa fa-remove"></i> </button></td>';
new_row += '<td>';
new_row += '<select class="form-control satuan_jual" name="id_satuan_jual" style="width:100%">'
new_row += '<option></option>';
new_row += '</select>';
new_row += '</td>';
new_row += '<td><input class="form-control qty" type="text" name="" value=""></td>';