Laravel : Referencing and installing package from local directory

If you are developing and maintaining a Laravel package and if you are looking to install the package in your Laravel application, you can do so by adding the following code in your applications’ composer.json file.


"repositories": [
        {
          "type": "path",
          "url": "../laravel-smart-ads"
        }
    ],

Once you have added this, you can proceed ahead by installing the package with the usual installation steps. In this case you would continue installing the package with the following steps.

composer require 5balloons/laravel-smart-ad

Site Footer