Skip to main content

Posts

CRUD dengan vue.js

pada tutorial kali ini kita akan belajar cara menampilkan data mengunakan  Vue JS  di framework  Codeigniter,  di dutorial sebelumnya kita sudah mempelajari cara Crud mengunakan Vue JS dan Codeigniter, kalian bisa lihat tutorialnya disini  CRUD CODEIGNITER DAN VUE JS  . kali ini kita akan mencoba menampilkan data yang ada pada database dengan framwork codeigniter dan vue js, untuk koneksi database di codeigniter adalah : <?php defined('BASEPATH') OR exit('No direct script access allowed'); $active_group = 'default'; $query_builder = TRUE; $db['default'] = array(     'dsn'    => '',     'hostname' => 'localhost',     'username' => 'root',     'password' => 'root',     'database' => 'civue',     'dbdriver' => 'mysqli',     'dbprefix' => '',     'pconnect' => FALSE,     ...

Angular

Evolution of Angular Angular is a JavaScript based open-source framework for building client-side web applications. So, let us first understand Javascript. JavaScript runs on the client side of the web, which can be used to design or program how the web pages behave on the occurrence of an event. Typically, JavaScript is used for interface interactions, slideshows and other interactive components. JavaScript evolved quickly and has also been used for server-side programming (like in Node.js), game development, etc. JavaScript deals with the dynamic content, which is an important aspect of web development. Dynamic content refers to constantly changing content and it adapts to specific users. For example, JavaScript can be used to determine whether or not to render the mobile version of the website by checking the device, which is accessing the website. This encouraged   web developers to start creating their own custom JavaScript libraries for reduci...

Membuat Codeigniter PDF di CPANEL

1. Download FPDF dan copykan di folder application/thirdparty/pdf/ 2. Buat file Fpdf_gen.php di libraries. <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class Fpdf_gen { public function __construct() {  require_once APPPATH.'third_party/fpdf/fpdf-1.8.php'; define('FPDF_FONTPATH', APPPATH.'third_party/fpdf/font/'); $pdf = new FPDF(); $pdf->AddPage(); $CI =& get_instance(); $CI->fpdf = $pdf; } public function Footer() { $this->fpdf->SetY(-15); $this->fpdf->SetFont('Arial','I',8); $this->fpdf->SetTextColor(128); $this->fpdf->Cell(0,10,'Page ',0,0,'C'); } } 3. Buat file pdf.php di controller <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); defined('BASEPATH') OR exit('No direct script access allowed'); class Pdf extends CI_Controller {   public f...
This post shows you how to make  HMVC  structure on CodeIgniter using  Third Party . Please follow these steps. 1. Download the third party zip for making the  HMVC  from  http://rupamhazra.com/download/MX.zip 2. Extract and then put the  MX  folder in  application/third_party  folder like below screenshot. 3. Download another zip from this link  http://www.rupamhazra.com/download/Loader&Router.zip and Extract in  application/core   MY_Loader  and  MY_Router. 4. Next, you create  modules  folder on  application  directory where you can define your module like  user  and under  user  you have to create  controllers, view, models. 5. Next, you have to make a file under  controllers  where you have defined the class which extends from  MX_Controller . 6. But  Model  extends From  CI_Model  as usual. 7.  Rest of the configura...

Integrate Wordpress in Codeigniter

Step 1: Download the Wordpress framework from wordpress.org Step 2:  Copy the Wordpress folder and paste into the Codeigniter root folder Step 3: Modify the "index.php" of Codeigniter and add Wp function to Codeigniter Search this code "require_once BASEPATH.'core/CodeIgniter.php';" Then, Add the below code above this code. "require_once('[WORDPRESS FOLDER NAME]/wp-blog-header.php');" WORDPRESS FOLDER NAME = Name of the Wordpress root Folder eg: blog Step 4: Create Datebase Install Wordpress by run url "localhost/[CODEIGNITER FOLDER NAME]/[WORDPRESS FOLDER NAME]" CODEIGNITER FOLDER NAME = Name of the Codeigniter root Folder Step 5: Blog Post Fetch Query for codeigniter home page <?php ... $BlogPosts = new WP_Query('showposts=3'); if($BlogPosts->have_posts()): while($BlogPosts->have_posts()) : $BlogPosts->the_post(); the_title(); the_content(); endwhile; endif; ... ?> Source: Youtube...

Cetak Rekap dengan MPDF

Controller: class Sks_rekap extends CI_Controller { public function __construct() { parent::__construct(); $this->load->model('sks/sks_rekap_model'); } public function index() {     $this->load->model('sks/sks_rekap_model');     $data['departments'] =  $this->sks_rekap_model->get_departments();     $data['center']='sks/sks_rekap_view';         /* note - you don't need to have the extension when it's a php file */     $this->load->view('dashboard/v_dashboard',$data); } public function cetak() {     $this->load->model('sks/sks_rekap_model');     $data['departments'] =  $this->sks_rekap_model->get_departments();         /* note - you don't need to have the extension when it's a php file */     $this->load->view('sks/sks_rekap_cetak_mpdf',$data); } } // model <?php ...

FPDF dengan CodeIgniter

Cetak Surat Keputusan Controller: <?php //File in controller named surat_keputusan.php defined('BASEPATH') OR exit('No direct script access allowed'); class Cetak_surat_keputusan extends CI_Controller { public function __construct()     {         parent::__construct();         $this->load->helper('url');         $this->load->database();                $this->db->select();         $this->db->from('surat.config_sk');                $query = $this->db->get();                 return $query->result();             } public function index() {      ...