Laravel Module Add And Configuration Simple way

--

  1. Module adder install by composer
composer require nwidart/laravel-modules

2. Publish vendor

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

3. Add “Modules” folder to composer.json autoload

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

4. composer dump-autoload

5. Create module by command

php artisan module:make <module-name>

Now check module and route. Thats it.

— Shah Md. Iktakhirul Islam, Software Engineer.

Contact Number: +8801683201359

Email: iktakhairul@gmail.com

GitHub Profile: https://github.com/iktakhairul

--

--