title: Codeigniter 3 composer and vendor directory
body: <p>I have installed codeigniter 3.1.8 and installed this library <a href="https://github.com/php-amqplib/php-amqplib" rel="nofollow noreferrer">https://github.com/php-amqplib/php-amqplib</a> using composer:</p>
  
  <p><code>composer require php-amqplib/php-amqplib</code></p>
  
  <p>This has created a directory vendor <a href="https://i.stack.imgur.com/XOTG1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XOTG1.png" alt="enter image description here"></a></p>
  
  <p>I have looked the accepted answer on how to use the library here <a href="https://stackoverflow.com/questions/13741917/how-to-use-composer-packages-in-codeigniter?utm_medium=organic&amp;utm_source=google_rich_qa&amp;utm_campaign=google_rich_qa">How to use composer packages in codeigniter?</a></p>
  
  <p>but this is my directory structure in vendor.</p>
  
  <p><a href="https://i.stack.imgur.com/WF7nR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WF7nR.png" alt="enter image description here"></a></p>
  
  <p>second</p>
  
  <p>and inside php-amqplib</p>
  
  <p><a href="https://i.stack.imgur.com/8tCUe.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8tCUe.png" alt="enter image description here"></a></p>
  
  <p>and inside php-amqplib</p>
  
  <p><a href="https://i.stack.imgur.com/1zZF4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1zZF4.png" alt="enter image description here"></a></p>
  
  <p>If i look at <code>index.php</code> i find that fcpath has already been defined</p>
  
  <pre><code>// Path to the front controller (this file) directory
  define('FCPATH', dirname(__FILE__).DIRECTORY_SEPARATOR);
  
  require_once BASEPATH.'core/CodeIgniter.php';
  </code></pre>
  
  <p>and defining it again will result in an error.How can i get to use php-amqplib inside my controller methods?.</p>