Welcome Guest, Not a member yet? Register   Sign In
Help with Composer and CodeIgniter
#2

Composer and CodeIgniter should play quite well together. In fact, if you look at your application/config/config.php file, you should see this:
PHP Code:
/*
|--------------------------------------------------------------------------
| Composer auto-loading
|--------------------------------------------------------------------------
|
| Enabling this setting will tell CodeIgniter to look for a Composer
| package auto-loader script in application/vendor/autoload.php.
|
|    $config['composer_autoload'] = TRUE;
|
| Or if you have your vendor/ directory located somewhere else, you
| can opt to set a specific path as well:
|
|    $config['composer_autoload'] = '/path/to/vendor/autoload.php';
|
| For more information about Composer, please visit http://getcomposer.org/
|
| Note: This will NOT disable or override the CodeIgniter-specific
|    autoloading (application/config/autoload.php)
*/
$config['composer_autoload'] = TRUE
There's also another post in this very forum talking about this. You might try searching the forum before posting next time.

One of the post summarizes things pretty nicely:
Quote:Create a composer.json file in your application folder
Run Composer install to install the packages you need
Use the packages in your code. If you did set the $config['composer_autoload'] to TRUE, they are all loaded and ready to use.
Reply


Messages In This Thread
RE: Help with Composer and CodeIgniter - by sneakyimp - 12-03-2016, 01:53 PM



Theme © iAndrew 2016 - Forum software by © MyBB