PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Monday, January 10, 2022

[FIXED] How to add some external package with nwidart/laravel-modules?

 January 10, 2022     composer-php, laravel     No comments   

Issue

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": "n.widart@gmail.com"
        }
    ],
    "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?


Solution

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



Answered By - Joundill
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing