Category Archives: Codeigniter

Meet Tusker – a small task manager for your projects

Created at: April 8, 2016; Last update: April 8, 2016

Hello again. I would like to present to you a small project I am working at. It is called Tusker, is made using CodeIgniter 3.x, and it is a simple task management web app. I sure hope you give it a try and tell me about new things to add to it. The Github repository can be found here:

Continue reading

“Why develop a web app with CodeIgniter in 2016?”

Created at: April 7, 2016; Last update: April 7, 2016

This question was proposed as a subject by one of this blog’s visitors. It is indeed a good question, especially considering that “CodeIgniter remained way behind other frameworks”.

So let’s think a bit about why would we use an “aged framework” when we have great frameworks like… and here the typical example is Laravel. Continue reading

How to make “truly” SEO friendly URLs in CodeIgniter (without “duplicate content” on underscore URLs)

Created at: March 23, 2016; Last update: March 24, 2016

I promised myself I won’t do anymore tutorials regarding CodeIgniter until a new version is about to appear, but I can’t help myself. And this subject seems more than appropriate for a new tutorial.

Let us start with the beginning. In routes.php (application/config/routes.php), we have a configuration parameter called “translate_uri_dashes“. If we set this parameter to TRUE, the CodeIgniter framework will translate the dashes (“-“) in our urls into underscores (“_”) when calling a controller or a method. This, of course is what we want in order to have “SEO friendly” URLs (although I think it’s strange that up until this moment, search engines can’t interpret an url). Continue reading

How to remove (redirect) trailing slashes from URLs using .htaccess

Created at: December 22, 2015; Last update: February 19, 2016

Well… I see a lot of questions regarding SEO friendly URLs, and also regarding the problem with URLs that have trailing slashes which show the same content as the URLs without trailing slashes. Although I really hope that the search engines are smarter than treating those URLs as duplicate content, I feel there is the need to know how to redirect them to the non-trailing slashes URLs.

So here it is. You open .htaccess, and you should have in it the following:

This should work for anything, not just CodeIgniter. Hope this helps…

The migrations in CodeIgniter or how to have a “Git” for your database (part 3 of 3: Using Matches for faster development)

Created at: July 27, 2015; Last update: July 27, 2015

Hmm… I don’t know about you but the two tutorials before this one in the series about migration really scared me with the naming, the controllers, the format of the migration, etc. So why not speed things up? We can do this by using Matches, a CodeIgniter CLI script that helps me speed things up when talking about development in CodeIgniter. I sure hope you didn’t just realize that this is also about promoting my script (which, by the way, it’s open source…). Continue reading

The migrations in CodeIgniter or how to have a “Git” for your database (part 2 of 3: Alter tables with Migrations in CodeIgniter)

Created at: July 24, 2015; Last update: July 24, 2015

(created at: July 23, 2015; last update: July 23, 2015)
Well… you got here. So I will be assuming that you’ve already followed the first episode of this tutorial ( and all went well up until the end. If something went wrong now is the time to tell me (in a comment to to previous tutorial, please).

Now we will go a bit deeper… So… By referring to what we did in the previous tutorial (a table named “users” that has “id”, “username”, “email”, and “password” as fields), we will try to see how we can alter the table the way we want to. Continue reading

The migrations in CodeIgniter or how to have a “Git” for your database (part 1 of 3)

Created at: July 22, 2015; Last update: July 29, 2015

(created at: July 22, 2015; last update: July 29, 2015)

Well… this title is a bit misleading, isn’t it? Let’s just start by talking about what is a Git.

Git is some sort of history tracker for your code. That is, whenever you modify something in your code, Git keeps a track of how the code looked before your update, and how it looks after the update. By using it, you and those that work with you can find out how the coding evolved and return to previous versions if something went wrong or want to create a new branch.

The same happens with the migrations, these being related to the database operations. Migrations help you and your team mates keep track of the changes you make to the database tables.

So let’s get to work and see how we can use them. Continue reading