Git Product home page Git Product logo

cisetup's Introduction

Is a codeigniter 3 framework that has been modified and added new features such as dotenv, sweet alert 2 & bootstrap 4, etc.

Installation

Use the composer to install cisetup.

composer create-project kubi/cisetup

set your dotenv file in .env

APP_URL=http://localhost/Kubi_codes/cisetup/
APP_TIMEZONE=Asia/Jakarta

DB_HOST=localhost
DB_USERNAME=root
DB_PASSWORD=
DB_DATABASE=
DB_DRIVER=mysqli

Some additional features

XSS Echo Filter

<?php echos($foobar); ?>

Assets Url

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

Create & Call dotenv

APP_TIMEZONE=Asia/Jakarta
getenv('APP_TIMEZONE');

Use DataTables

add this code above the html <head>

 <?php table_url(); ?>   

after that create a table using the html <table> tag and add the id to the table tag

<table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">
	<thead>
		<tr>
			<th>Name</th>
			<th>Position</th>
			<th>Office</th>
			<th>Age</th>
			<th>Start date</th>
			<th>Salary</th>
		</tr>
	</thead>
	<tbody>
		<tr>
			<td>Tiger Nixon</td>
			<td>System Architect</td>
			<td>Edinburgh</td>
			<td>61</td>
			<td>2011/04/25</td>
			<td>$320,800</td>
		</tr>
	<tbody>
</table>

at the end add a script to call the data tables

$(document).ready(function() {
	$('#dataTable').DataTable();
});

Use Sweet Alert

 notif('type','title', 'message','url');    
  • type = ('success','warning','info','danger')
  • url = base_url()+url

example

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

Use Unirest

HTTP Request GET

 request_get($url);    

HTTP Request POST

 request_post($url, $query);

HTTP Request PUT

 request_put($url, $query);

HTTP Request DELETE

 request_delete($url);

example

in your controller

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');
}

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

Thanks For

License

MIT

cisetup's People

Contributors

kubil-ismail avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.