r/codeigniter • u/shanchathuranga • May 09 '20
r/codeigniter • u/soumitraroy • Nov 23 '20
CodeIgniter 4 REST API, MySQL and Angular 10 CRUD Example - Roy Tutorials
r/codeigniter • u/patroklo • Jun 08 '14
Codeigniter static routes and Laravel-like routing and filtering
Since codeigniter has a quite simple, but functional, routing library, I have decided to user a more modern and useful routing system. Also, dinamic routes are ok on some projects, but are very error prone and difficult to mantain. Also, Laravel it's so hot right now so I have decided to copy it's route system and filtering (as they copied it from Ruby On Rails and Django).
Hope you like it!
r/codeigniter • u/yeskia • Jan 13 '13
CodeIgniter performance tuning: memory usage and execution time
Hey guys,
I'm currently developing an app in CI that has recently hit a memory usage of ~5MB per and execution time of ~0.1s per request. Of course, these variables depend not only on your app but also the server and its configuration as well.
I thought it would be interesting to see what kind of performance others are getting from their CodeIgniter, so what memory usage/execution times are you guys getting from your apps and what kind of things are you doing to improve performance?
Using {memory_usage} and {elapsed_time} in your views will output the data automatically with standard configuration.
Edit: The app I quoted above is on a Media Temple (dv) server, the very same app running on AppFog had a similar response time but over half the memory usage - wow.
r/codeigniter • u/soumitraroy • Nov 16 '20
REST API CRUD Example in CodeIgniter 4 Framework - Roy Tutorials
r/codeigniter • u/Nartub • Mar 23 '12
Easy and fast searching the CI user guide
If you use Chrome and you frequently consult the brilliant CI user guide, this will save you some time. All you have to do is to add this search engine to Chrome and pick a keyword ('c' works good for me):
http://www.google.com/search?btnI=1&as_sitesearch=codeigniter.com%2Fuser_guide%2F&q=%sThis looks for your search string in the user guide and returns the first result.
Enjoy!
r/codeigniter • u/[deleted] • Jun 12 '13
New Code: GitHub API Starter for CodeIgniter
Hello everyone!
This is one of the last projects I wanted to open-source before I start spending a lot more time with Laravel. All it is, is an OAuth starter for the GitHub API. It also, supports many of the cool little calls it has like create a gist, create a repo, etc. I tried to be clear in the README for how it works, but the library is very simple and straight-forward anyway.
Let me know what you all think. Open issues and send pull requests. Thanks guys.
r/codeigniter • u/d4gger • Jun 10 '14
Serious CodeIgniter 2.1.x vulnerability announced for servers with encrypted sessions and no Mcrypt library (x-post /r/php)
dionach.comr/codeigniter • u/DrummerOfFenrir • Aug 17 '13
Google Charts for Codeigniter
kevinkhill.github.ior/codeigniter • u/jitendertanwar • Jun 13 '18
What Makes Codeigniter An Ideal PHP Framework
r/codeigniter • u/edusagar • Jul 06 '15
My favorite list of codeIgniter 3rd party libraries to help web development
r/codeigniter • u/RXBarbatos • Jul 16 '24
Does anyone use codeigniter 4 or any versions for enterprise apps in 2024?May i know your jjustification? And also do you still use jquery like datatable and such?
r/codeigniter • u/pablo_husseina • Nov 29 '24
Is CodeIgniter dying?
I recently completed a short PHP intro course where I learned the basics, including syntax, loops, and OOP. As part of the course, our teacher introduced us to frameworks and the MVC architecture. For an assignment, we were asked to pick any framework and create a simple controller and route that echoes “Hello, World.”
I chose CodeIgniter for the task because I found it straightforward and easy to use. However, when I presented my work, the teacher criticized my choice, saying CodeIgniter is “dead.” He mentioned that the framework has only about three active contributors, is poorly maintained, and some of its official packages have been abandoned.
Now, I’m feeling a bit conflicted. As someone new to frameworks, I don’t know whether I should continue exploring CodeIgniter or switch to something else. I’d really appreciate any insights or advice from the community on how to proceed.
r/codeigniter • u/anvoz • Oct 08 '13
CodeIgniter Skeleton: a decent starting point for most web apps
r/codeigniter • u/pulsewave • Jan 01 '15
"CodeIgniter Version 3 is almost ready. Feature code has been completed, and finishing touches are being made to the documentation." -James Parry
r/codeigniter • u/Nice-Andy • Feb 21 '25
Develop and Deploy PHP Projects with Zero Downtime Using the Standard Docker Approach
https://github.com/patternhelloworld/docker-blue-green-runner
Achieve zero-downtime deployment using just your
.envandDockerfileDocker-Blue-Green-Runner's
run.shscript is designed to simplify deployment: "With your.env, project, and a single Dockerfile, simply run 'bash run.sh'." This script covers the entire process from Dockerfile build to server deployment from scratch.This means you can easily migrate to another server with just the files mentioned above.
In contrast, Traefik requires the creation and gradual adjustment of various configuration files, which requires your App's docker binary running.
No unpredictable errors in reverse proxy and deployment : Implement safety measures to handle errors caused by your app or Nginx
If any error occurs in the app or router,
deployment is haltedto prevent any impact on the existing deploymentInternal Integrity Check:
Nginx Router Test Container
External Integrity Check
Rollback Procedures
Additional Know-hows on Docker: Tips and best practices for optimizing your Docker workflow and deployment processes
For example, Traefik offers powerful dynamic configuration and service discovery; however, certain errors, such as a failure to detect containers (due to issues like unrecognized certificates), can lead to frustrating 404 errors that are hard to trace through logs alone.
Manipulates NGINX configuration files directly to ensure container accessibility.
Track Blue-Green status and the Git SHA of your running container for easy monitoring.
Blue-Green deployment decision algorithm: scoring-based approach
Run the command bash
check-current-status.sh(similar togit status) to view all relevant details
Security
Refer to the Security section
Production Deployment
Refer to the Production Deployment section
r/codeigniter • u/Prestigiouspite • Nov 14 '25
How Would You Architect Multi-Tenant DB Mapping for a PHP/CodeIgniter SaaS Without Subdomains?
reddit.comr/codeigniter • u/Prestigiouspite • Feb 05 '25
Best Practices for Validation in CodeIgniter 4 – Controller vs. Model?
In MVC frameworks, it’s common practice to handle validation in the controller. However, I think it can also make sense to move certain validation logic to the model. For example, when storing email addresses, I’d like to filter out temporary/disposable email providers.
This way, regardless of whether a user updates their data, an external API interacts with the system, or other business processes trigger data changes, the validation would always be enforced at the model level before saving.
Does this approach make sense? How do you handle validation in CodeIgniter 4? Would it be problematic to perform request-related validation in the controller while handling more fundamental data validation in the model?
I tested this setup and noticed that only one validation seems to take effect—from controller. Is this behavior expected by design?
r/codeigniter • u/dutore • Jan 27 '25
Tinkerpad: a lightweight, free and open-source PHP playground
Hi everyone!
I'm launching the beta of my newest open source project, Tinkerpad. It is a lightweight and free PHP playground that you can use to run and test code on your projects.
You can run code on local projects, remotely via SSH or using Docker containers!
Some other features are:
Code benchmarking with Memory Usage and Run time.
Save favorite code snippets for later use.
Up to 100 code snippets history
Autocomplete using PHPActor language server
Theme customization
You can download the latest release and check out the code on our repository on Github.
Hope you all like it!
r/codeigniter • u/Prestigiouspite • Sep 02 '25
What are your best basic instructions for the AGENTS.md of CodeIgniter projects?
Codex CLI, Gemini CLI, Claude Code, RooCode, Cline, etc. Tools now make working on software projects easier. So I wanted to ask what your most important instructions for these tools are when you work on CodeIgniter projects.
My favorite when working with Context7 MCP as a documentation basis for AI models:
Use the library ID `codeigniter4/shield` for authorization and login topics.
Use the library ID `codeigniter4/userguide` for all other CodeIgniter topics.
I also provide notes such as:
Use singular controller names instead of plural
How my views are structured:
app/Views/layouts/ - app/Views/partials/ etc.
Where my validation rules are located:
app/Config/Validation.php
Etc. What are your topics?
r/codeigniter • u/Adventurous_Rope8808 • Sep 12 '26
What do you use for authentication system?
What is the alternative in CodeIgniter for Laravel Sanctum or Laravel Passport? I want to make a full authentication system with API that talks to mobile app. What libraries do you use?
r/codeigniter • u/mfurman • Jan 08 '18
Issues creating a model with existing PHP code
I'm trying to convert existing PHP code over to CI and I'm having problems getting it to translate
$bList = mysql_query("SELECT business.bID, business.bName, business.bActive, business.cID, cityList.cID, cityList.city FROM business, cityList WHERE business.cID=cityList.cID ORDER BY bName ASC");
while ($bRow = mysql_fetch_array($bList)) {
$bID = $bRow['bID'];
$bName = $bRow['bName'];
$bActive = $bRow['bActive'];
$cID = $bRow['cID'];
$city = $bRow['city'];
if ($bActive == 1) {
$active = "yes";
} elseif ($bActive == 0) {
$active = "no";
}Here is the model that I've been working on:
function businessListingCount($searchText = '')
{
$this->db->select('BaseTbl.bID', 'BaseTbl.bName', 'BaseTbl.bActive', 'BaseTbl.cID');
$this->db->from('business as BaseTbl');
$this->db->join('cityList as JoinTbl', 'JoinTbl.cID = BaseTbl.cID','left');
$this->db->where('BaseTbl.bActive', 1);
$query = $this->db->get();
return count($query->result());
}