Custom Package dependencies

  • Hi,

    I am crating my own custom package in bagisto, for that i need to call some dependencies which i have mentioned in my composer.json file, lets say specific php version and below modules

        "spatie/eloquent-sortable": "^3.11",
        "spatie/laravel-sluggable": "^2.6",
        "spatie/laravel-translatable": "^4.6",
        "stripe/stripe-php": "^7.107",

    I got stuck on this that, on which location this dependencies I need to install them?

    1) MyProject/Packages/Bagisto/MyCustomPackage/Vendor
    2) MyProject/Vendor

    I am asking this because the same dependencies are already installed in my project, do i have to re-download them in (1) path OR I can use the existing one from the path (2).

    If the version is different in both composer file, it will create an error?

  • Hi there,
    You have to install them below.
    Path- MyProject/Packages/Bagisto/MyCustomPackage/Vendor

    Yes, you can use the existing dependencies but if the versions are different then it can create the error.

Log in to reply