0

In Laravel 6/nwidart/laravel-modules 7 app I see file composer.json in root of my module with lines :

{ "name": "nwidart/pages", "description": "", "authors": [ { "name": "Nicolas Widart", "email": "[email protected]" } ], "extra": { "laravel": { "providers": [], "aliases": { } } }, "autoload": { "psr-4": { "Modules\\Pages\\": "" } } } 

I suppose that if I want to add some external package into my module(not the whole app) I need to edit this file and run module commands? How have I to edit it and which commands to use?

2 Answers 2

3

You can use regular composer commands in the module directory. Just cd into it then use composer require package-name.

Sign up to request clarification or add additional context in comments.

3 Comments

Thanks! Also as for npm packages? Similar rules ?
Pls look also at UPDATED:
That's a different question. You should roll back your changes and ask a new question.
3

After adding an entry to the compose file using e.g. in folder your module

composer require package-name 

Use the command in the main application in folder global application

php artisan module:update name-your-module 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.