Skip links

How to add a composer package manually to your php or laravel project.

The process is quite simple.

For Syncing newly added packages from local machine to the server, follow below steps.

  1. Add the package to the vendor folder
  2. Upload \vendor\composer folder

For just adding the newly added package from local machine to the server, follow below steps

  1. Add the package to the vendor folder
  2. Add a reference in \vendor\composer\autoload_namespaces.php
  3. Add a reference in \vendor\composer\autoload_psr4.php
  4. Also look for any other references in all files of \vendor\composer folder. There are 8-10 files in \vendor\composer folder.

Should work automatically now when the vendor\autoloader.php is called.

Leave a comment