Using Composer with Codeigniter

So you want to use composer in your next Codeigniter Project?

Well here’s how to do it:

1. Download and install Codeigniter

2. CD to project directory and install Composer
curl -sS https://getcomposer.org/installer | php

3. Create a composer.json file in your project root and define dependencies
{
"require": {
"monolog/monolog": "1.2.*"
}
}

4. Install Dependecies
php composer.phar install

This will create a vendor directory in your root folder of your project.

5. Add autoload.php to your Codeigniter’s index.php before require_once BASEPATH.’core/CodeIgniter.php’;

include_once './vendor/autoload.php';

Thats’s it. Now you can use your newly installed libraries in CI. Have fun!

Brace yourselves. Here comes the Movember

Look around you, everyone is growing moustaches. This is that time of the year which brings me bliss. Happy No Shave November people! Hell yeah! No Shaving for a month. And you can look like a cave man – bliss I say!

To honour this tradition – Movember, I am growing my facial hair. So are my colleagues 😀 Check it out at: http://facebook.com/moochember.

This is what I look like right now! God knows what will I turn into at the end! I will try to update you people every now and then.

Movember progress - November 4th
Movember progress – November 4th