Laravel How to create a Modules to support in laravel

In tutorial learn create modules in laravel, Follow the instructions on command  to support to laravel module, nwidart/laravel-modules is a Laravel package which created to manage your large Laravel app using modules.

STEP 1: Install through the composer

$ composer require nwidart/laravel-modules



STEP 2.  Publish the package's configuration file

$ php artisan vendor:publish --provider="Nwidart\Modules\LaravelModulesServiceProvider"


STEP 3. Add in composer.json


   {
  "autoload": {
    "psr-4": {
      "App\\": "app/",
      "Modules\\": "Modules/"
    }
  }
}


Now, Run

 composer dump-autoload

No comments:

Post a Comment

how to call ssh from vs code

 To call SSH from VS Code, you can use the built-in Remote Development extension. This extension allows you to open a remote folder or works...