codeigniter framework
TRANSCRIPT
![Page 1: CodeIgniter Framework](https://reader035.vdocuments.mx/reader035/viewer/2022062307/557480a7d8b42a0f178b5292/html5/thumbnails/1.jpg)
![Page 2: CodeIgniter Framework](https://reader035.vdocuments.mx/reader035/viewer/2022062307/557480a7d8b42a0f178b5292/html5/thumbnails/2.jpg)
Disclaimer: This presentation is prepared by trainees of baabtra as a part of mentoring program. This is not official document of baabtra –Mentoring PartnerBaabtra-Mentoring Partner is the mentoring division of baabte System Technologies Pvt . Ltd
![Page 4: CodeIgniter Framework](https://reader035.vdocuments.mx/reader035/viewer/2022062307/557480a7d8b42a0f178b5292/html5/thumbnails/4.jpg)
Intro of CodeIgniter
CodeIgniter (CI) is one of popular php framework. If you are already building PHP Application, CodeIgniter will help you to do it better and more easily. With CodeIgniter, you can save time, make your web more robust, your code will be easier to read and maintenance. It is free, lightweight, and simple to install..
With CodeIgniter, you can cut down the amount of code you need to type. This is not just good for lazy, but: less type, fewer mistake, and less time for spend debugging.
![Page 5: CodeIgniter Framework](https://reader035.vdocuments.mx/reader035/viewer/2022062307/557480a7d8b42a0f178b5292/html5/thumbnails/5.jpg)
ModelViewController
![Page 6: CodeIgniter Framework](https://reader035.vdocuments.mx/reader035/viewer/2022062307/557480a7d8b42a0f178b5292/html5/thumbnails/6.jpg)
CI Database Configuration
Search Google CodeIgniter or http://ellislab.com/codeigniter | Copy to Server
Change Default Controller | Config->routers -> Default Controller
Calling a Function to load | $this->functionname();
![Page 7: CodeIgniter Framework](https://reader035.vdocuments.mx/reader035/viewer/2022062307/557480a7d8b42a0f178b5292/html5/thumbnails/7.jpg)
Models
Model -------<?php
class Math extends CI_Model{
public function add(){
return 1+1}}
Controller---------
public function addStuff(){
$this->load->model("math");$this->math->add();
}
$this->addStuff();
![Page 8: CodeIgniter Framework](https://reader035.vdocuments.mx/reader035/viewer/2022062307/557480a7d8b42a0f178b5292/html5/thumbnails/8.jpg)
How to Pass to Views
Controller View
![Page 9: CodeIgniter Framework](https://reader035.vdocuments.mx/reader035/viewer/2022062307/557480a7d8b42a0f178b5292/html5/thumbnails/9.jpg)
Data Passing to MVC [1/3]
Controller
![Page 10: CodeIgniter Framework](https://reader035.vdocuments.mx/reader035/viewer/2022062307/557480a7d8b42a0f178b5292/html5/thumbnails/10.jpg)
Data Passing to MVC [2/3]
Model
![Page 11: CodeIgniter Framework](https://reader035.vdocuments.mx/reader035/viewer/2022062307/557480a7d8b42a0f178b5292/html5/thumbnails/11.jpg)
Data Passing to MVC [3/3]
View
![Page 12: CodeIgniter Framework](https://reader035.vdocuments.mx/reader035/viewer/2022062307/557480a7d8b42a0f178b5292/html5/thumbnails/12.jpg)
URLs |mod_rewrite | URIs s
Create file .htaccess | Open and Correct Rewrite Base
Check rewrite module is on in Local Apache Server
Last Open -> Config Folder -> Config-> remove index.php
https://github.com/EllisLab/CodeIgniter/wiki/Removing-index.php-in-codeigniter-xampp-for-windows
![Page 13: CodeIgniter Framework](https://reader035.vdocuments.mx/reader035/viewer/2022062307/557480a7d8b42a0f178b5292/html5/thumbnails/13.jpg)
Connecting DataBase
Open -> Config Folder -> autoload->
Create the Database
Open database.php within CodeIgniter\system\application\config. Set config like below:
![Page 14: CodeIgniter Framework](https://reader035.vdocuments.mx/reader035/viewer/2022062307/557480a7d8b42a0f178b5292/html5/thumbnails/14.jpg)
Get Value from Database [1/3]
Controller
![Page 15: CodeIgniter Framework](https://reader035.vdocuments.mx/reader035/viewer/2022062307/557480a7d8b42a0f178b5292/html5/thumbnails/15.jpg)
Get Value from Database [2/3]
Model
![Page 16: CodeIgniter Framework](https://reader035.vdocuments.mx/reader035/viewer/2022062307/557480a7d8b42a0f178b5292/html5/thumbnails/16.jpg)
Get Value from Database [3/3]
View
![Page 17: CodeIgniter Framework](https://reader035.vdocuments.mx/reader035/viewer/2022062307/557480a7d8b42a0f178b5292/html5/thumbnails/17.jpg)
Insert Value in Database [1/2]
Controller
OR
![Page 18: CodeIgniter Framework](https://reader035.vdocuments.mx/reader035/viewer/2022062307/557480a7d8b42a0f178b5292/html5/thumbnails/18.jpg)
Insert Value in Database [2/2]
Model
OR
![Page 19: CodeIgniter Framework](https://reader035.vdocuments.mx/reader035/viewer/2022062307/557480a7d8b42a0f178b5292/html5/thumbnails/19.jpg)
Update Value in Database [1/2]
Controller
OR
![Page 20: CodeIgniter Framework](https://reader035.vdocuments.mx/reader035/viewer/2022062307/557480a7d8b42a0f178b5292/html5/thumbnails/20.jpg)
Update Value in Database [2/2]
Model
OR
![Page 21: CodeIgniter Framework](https://reader035.vdocuments.mx/reader035/viewer/2022062307/557480a7d8b42a0f178b5292/html5/thumbnails/21.jpg)
Delete Value from Database [1/2]
Controller
![Page 22: CodeIgniter Framework](https://reader035.vdocuments.mx/reader035/viewer/2022062307/557480a7d8b42a0f178b5292/html5/thumbnails/22.jpg)
Delete Value from Database [2/2]
Model
![Page 23: CodeIgniter Framework](https://reader035.vdocuments.mx/reader035/viewer/2022062307/557480a7d8b42a0f178b5292/html5/thumbnails/23.jpg)
QUESTIONS SECTION
![Page 24: CodeIgniter Framework](https://reader035.vdocuments.mx/reader035/viewer/2022062307/557480a7d8b42a0f178b5292/html5/thumbnails/24.jpg)
If this presentation helped you, please visit our page facebook.com/baabtra and like it.
Thanks in advance.
www.baabtra.com | www.massbaab.com |www.baabte.com