PHP code example of kubi / cisetup

1. Go to this page and download the library: Download kubi/cisetup library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

kubi / cisetup example snippets


 echos($foobar); 

<img src="<?= asset_url() . 'img/foobar.png' 

  table_url(); 
 
table($table_title, $table_key, $table_data)

$data['table_title'] = 'data_table';
$data['table_key'] = ['ID', 'Category Name', 'Product Name', 'Cashier Name'];
$data['table_data'] = $this->db->get('product')->result_array();

 notif('type','title', 'message','url');    

 notif('success','Login Success', 'Welcome to app','home/user');    

 request_get($url);    

 request_post($url, $query);

 request_put($url, $query);

 request_delete($url);

public function index()
{
 // Use notif
 notif('success','Welcome to kubicode', 'This is the message from Home/index');

 // Data for send to view
 $data['title'] = 'Home | Kubi Code';
 $data['response'] = request_get('https://jsonplaceholder.typicode.com/todos');

 // Load view
 $this->load->view('layouts/header',$data);
 $this->load->view('home/index');
 $this->load->view('layouts/footer');
}
dotenv
getenv('APP_TIMEZONE');
html

	table($table_title, $table_key, $table_data);