Module Management In Laravel

Overview

Laravel-Modules

Latest Version on Packagist Software License Build Status Scrutinizer Coverage Quality Score Total Downloads

Laravel laravel-modules
5.4 ^1.0
5.5 ^2.0
5.6 ^3.0
5.7 ^4.0
5.8 ^5.0
6.0 ^6.0
7.0 ^7.0
8.0 ^8.0

nwidart/laravel-modules is a Laravel package which created to manage your large Laravel app using modules. Module is like a Laravel package, it has some views, controllers or models. This package is supported and tested in Laravel 8.

This package is a re-published, re-organised and maintained version of pingpong/modules, which isn't maintained anymore. This package is used in AsgardCMS.

With one big added bonus that the original package didn't have: tests.

Find out why you should use this package in the article: Writing modular applications with laravel-modules.

Install

To install through Composer, by run the following command:

composer require nwidart/laravel-modules

The package will automatically register a service provider and alias.

Optionally, publish the package's configuration file by running:

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

Autoloading

By default, the module classes are not loaded automatically. You can autoload your modules using psr-4. For example:

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

Tip: don't forget to run composer dump-autoload afterwards.

Documentation

You'll find installation instructions and full documentation on https://nwidart.com/laravel-modules/.

Credits

About Nicolas Widart

Nicolas Widart is a freelance web developer specialising on the Laravel framework. View all my packages on my website, or visit my website.

License

The MIT License (MIT). Please see License File for more information.

Comments
  • How to load Vue Component with InertiaJS in Laravel 8 Modules

    How to load Vue Component with InertiaJS in Laravel 8 Modules

    In Laravel 8 we can load Component with Inertiajs

    We initialize Inertia in app.blade.php with this @inertia

    After that in app.js file, we can initialize it like this:

    const app = document.getElementById('app');
    
    new Vue({
        render: (h) =>
            h(InertiaApp, {
                props: {
                    initialPage: JSON.parse(app.dataset.page),
                    resolveComponent: (name) => require(`./Pages/${name}`).default,
                },
            }),
    }).$mount(app);
    

    Then all components will load from the Pages folder.

    Now, my question is:

    How can I achieve it in a Module? I want to load Vuejs Components using Inertiajs. In module, this Resources/assets/js/app.js file is empty. If I put the above code in it and create a Pages folder but it's giving me error!

    import { createApp, h } from 'vue'
    import { App, plugin } from '@inertiajs/inertia-vue3'
    
    const el = document.getElementById('app')
    
    createApp({
      render: () => h(App, {
        initialPage: JSON.parse(el.dataset.page),
        resolveComponent: name => require(`./Pages/${name}`).default,
      })
    }).use(plugin).mount(el)
    

    In Core ( I made this ) module master.blade.php

    <!DOCTYPE html>
    <html lang="en">
        <head>
            <meta charset="utf-8">
            <meta http-equiv="X-UA-Compatible" content="IE=edge">
            <meta name="viewport" content="width=device-width, initial-scale=1">
            <title>Module Core</title>
           <link rel="stylesheet" href="{{ mix('css/core.css') }}">
    
        </head>
        <body>
            @inertia
            <script src="{{ mix('js/core.js') }}"></script>
        </body>
    </html>
    

    CoreController:

    use Inertia\Inertia;
    
    class CoreController extends Controller
    {
        public function index()
        {
            return Inertia::render('Admin/Index');
        }
    }
    

    I have a Page in assets/js/Pages/Admin/Index.vue

    I want to load this. But giving me error:

    [Vue warn]: Error in created hook: "Error: Cannot find module './Admin/Index'"

    stale 
    opened by lavecart 43
  • Routes defined in routes/web.php not working anymore

    Routes defined in routes/web.php not working anymore

    Below routes defined in Laravel's default routing file routes/web.php are not working from the browser, but can be seen in route:list.

    The same block of code defined in any routes.php under any module is working fine.

    Route::group(['prefix' => 'api', 'namespace' => 'App\Http\Controllers'], function () {
        Route::get('/world/countries', 'API\WorldController@countrylist')->name('API.world.countrylist');
        Route::get('/world/regions', 'API\WorldController@regionlist')->name('API.world.regionlist');
        Route::get('/world/cities', 'API\WorldController@citylist')->name('API.world.citylist');
    });
    
    opened by amitshahc 38
  • php artisan module: seed Not working

    php artisan module: seed Not working

    Hi, I've tried everything, the same error occurs.

    " In SeedCommand.php line 177:

    Type error: Argument 1 passed to Nwidart\Modules\Commands\SeedCommand::reportException() must be an instance of Exception, instance of Er ror given, called in F:\laragon\www\rhema\vendor\nwidart\laravel-modules\src\Commands\SeedCommand.php on line 50 "

    call("UserTableSeeder"); User::create([ 'name' => 'Admin', 'email' => '[email protected]', 'password' => bcrypt(123456) ]); } } Could someone help me? I've tried creating the UserTableSeeder class but the same error occurs.
    opened by githubmarau 31
  • ExceptionHandler::report() mu st be an instance of Exception

    ExceptionHandler::report() mu st be an instance of Exception

    I'm working with seeds, but I got this error message:

    "Symfony\Component\Debug\Exception\FatalThrowableError : Type error: Argument 1 passed to NunoMaduro\Collision\Adapters\Laravel\ExceptionHandler::report() mu st be an instance of Exception, instance of Error given, called in C:\proyectos
    laravel\onyx\vendor\nwidart\laravel-modules\src\Commands\SeedCommand.php on line 179"

    I don't understand this issue, because I can't read the real error message and I don't know what happens!

    I'm using Laravel 5.6 and nwidart/laravel-modules v3.0

    It falls in this instruction: $profile->options()->sync($options);

    Thanks for your help!

    help wanted 
    opened by Alercard 29
  • Laravel 7 - ModuleNotFoundException

    Laravel 7 - ModuleNotFoundException

    Hi,

    Testing after updating to Laravel 7, running into a few issues, mainly this one has me stumped:

    $ php artisan module:make TestModule;
    Created : /Users/nabeelshahzad/dev/nabeelio/phpvms/modules/TestModule/module.json
    Created : /Users/nabeelshahzad/dev/nabeelio/phpvms/modules/TestModule/Http/Routes/web.php
    Created : /Users/nabeelshahzad/dev/nabeelio/phpvms/modules/TestModule/Http/Routes/api.php
    Created : /Users/nabeelshahzad/dev/nabeelio/phpvms/modules/TestModule/Http/Routes/admin.php
    Created : /Users/nabeelshahzad/dev/nabeelio/phpvms/modules/TestModule/Providers/AppServiceProvider.php
    Created : /Users/nabeelshahzad/dev/nabeelio/phpvms/modules/TestModule/Providers/EventServiceProvider.php
    Created : /Users/nabeelshahzad/dev/nabeelio/phpvms/modules/TestModule/Providers/RouteServiceProvider.php
    Created : /Users/nabeelshahzad/dev/nabeelio/phpvms/modules/TestModule/Resources/views/index.blade.php
    Created : /Users/nabeelshahzad/dev/nabeelio/phpvms/modules/TestModule/Resources/views/admin/index.blade.php
    Created : /Users/nabeelshahzad/dev/nabeelio/phpvms/modules/TestModule/Resources/views/layouts/frontend.blade.php
    Created : /Users/nabeelshahzad/dev/nabeelio/phpvms/modules/TestModule/Resources/views/layouts/admin.blade.php
    Created : /Users/nabeelshahzad/dev/nabeelio/phpvms/modules/TestModule/Listeners/TestEventListener.php
    Created : /Users/nabeelshahzad/dev/nabeelio/phpvms/modules/TestModule/Http/Controllers/Frontend/IndexController.php
    Created : /Users/nabeelshahzad/dev/nabeelio/phpvms/modules/TestModule/Http/Controllers/Api/ApiController.php
    Created : /Users/nabeelshahzad/dev/nabeelio/phpvms/modules/TestModule/Http/Controllers/Admin/AdminController.php
    Created : /Users/nabeelshahzad/dev/nabeelio/phpvms/modules/TestModule/Config/config.php
    Created : /Users/nabeelshahzad/dev/nabeelio/phpvms/modules/TestModule/composer.json
    [2020-05-22T18:39:50.366694+00:00] dev.ERROR: Module [TestModule] does not exist! {"exception":"[object] (Nwidart\\Modules\\Exceptions\\ModuleNotFoundException(code: 0): Module [TestModule] does not exist! at /Users/nabeelshahzad/dev/nabeelio/phpvms/vendor/nwidart/laravel-modules/src/FileRepository.php:396)"} []
    
       Nwidart\Modules\Exceptions\ModuleNotFoundException
    
      Module [TestModule] does not exist!
    
      at vendor/nwidart/laravel-modules/src/FileRepository.php:396
        392|         if ($module !== null) {
        393|             return $module;
        394|         }
        395|
      > 396|         throw new ModuleNotFoundException("Module [{$name}] does not exist!");
        397|     }
        398|
        399|     /**
        400|      * Get all modules as laravel collection instance.
    
          +31 vendor frames
      32  artisan:35
          Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    

    It looks like all the files I'm expecting are generated:

    modules/TestModule
    ├── Config
    │   └── config.php
    ├── Console
    ├── Database
    │   ├── factories
    │   ├── migrations
    │   └── seeds
    ├── Http
    │   ├── Controllers
    │   │   ├── Admin
    │   │   │   └── AdminController.php
    │   │   ├── Api
    │   │   │   └── ApiController.php
    │   │   └── Frontend
    │   │       └── IndexController.php
    │   ├── Middleware
    │   ├── Requests
    │   └── Routes
    │       ├── admin.php
    │       ├── api.php
    │       └── web.php
    ├── Listeners
    │   └── TestEventListener.php
    ├── Models
    ├── Providers
    │   ├── AppServiceProvider.php
    │   ├── EventServiceProvider.php
    │   └── RouteServiceProvider.php
    ├── Resources
    │   ├── assets
    │   ├── lang
    │   └── views
    │       ├── admin
    │       │   └── index.blade.php
    │       ├── index.blade.php
    │       └── layouts
    │           ├── admin.blade.php
    │           └── frontend.blade.php
    ├── composer.json
    ├── module.json
    └── tests
    

    This is what my config looks like; I'm generating some extra files and scaffolding:

    <?php
    
    use Nwidart\Modules\Activators\FileActivator;
    
    return [
        'namespace' => 'Modules',
        'stubs'     => [
            'enabled' => true,
            'path'    => resource_path().'/stubs/modules',
            'files'   => [
                'routes'                 => 'Http/Routes/web.php',
                'routes-api'             => 'Http/Routes/api.php',
                'routes-admin'           => 'Http/Routes/admin.php',
                'app-provider'           => 'Providers/AppServiceProvider.php',
                'event-service-provider' => 'Providers/EventServiceProvider.php',
                'route-provider'         => 'Providers/RouteServiceProvider.php',
                'views/index'            => 'Resources/views/index.blade.php',
                'views/index-admin'      => 'Resources/views/admin/index.blade.php',
                'views/frontend'         => 'Resources/views/layouts/frontend.blade.php',
                'views/admin'            => 'Resources/views/layouts/admin.blade.php',
                'listener-test'          => 'Listeners/TestEventListener.php',
                'controller'             => 'Http/Controllers/Frontend/IndexController.php',
                'controller-api'         => 'Http/Controllers/Api/ApiController.php',
                'controller-admin'       => 'Http/Controllers/Admin/AdminController.php',
                'config'                 => 'Config/config.php',
                'composer'               => 'composer.json',
            ],
            'replacements' => [
                'start'                  => ['LOWER_NAME', 'ROUTES_LOCATION'],
                'routes'                 => ['LOWER_NAME', 'STUDLY_NAME', 'MODULE_NAMESPACE'],
                'routes-api'             => ['LOWER_NAME', 'STUDLY_NAME', 'MODULE_NAMESPACE'],
                'json'                   => ['LOWER_NAME', 'STUDLY_NAME', 'MODULE_NAMESPACE'],
                'app-provider'           => ['LOWER_NAME', 'STUDLY_NAME', 'MODULE_NAMESPACE'],
                'event-service-provider' => ['LOWER_NAME', 'STUDLY_NAME', 'MODULE_NAMESPACE', 'CLASS_NAMESPACE'],
                'route-provider'         => ['LOWER_NAME', 'STUDLY_NAME', 'MODULE_NAMESPACE', 'CLASS_NAMESPACE'],
                'listener-test'          => ['LOWER_NAME', 'STUDLY_NAME', 'MODULE_NAMESPACE'],
                'views/index'            => ['LOWER_NAME'],
                'views/index-admin'      => ['LOWER_NAME', 'STUDLY_NAME'],
                'views/frontend'         => ['STUDLY_NAME'],
                'views/admin'            => ['STUDLY_NAME'],
                'controller'             => ['MODULE_NAMESPACE', 'STUDLY_NAME', 'CLASS_NAMESPACE', 'LOWER_NAME'],
                'controller-admin'       => ['MODULE_NAMESPACE', 'STUDLY_NAME', 'CLASS_NAMESPACE', 'LOWER_NAME'],
                'controller-api'         => ['MODULE_NAMESPACE', 'STUDLY_NAME', 'CLASS_NAMESPACE', 'LOWER_NAME'],
                'config'                 => ['STUDLY_NAME'],
                'composer'               => [
                    'LOWER_NAME',
                    'STUDLY_NAME',
                    'VENDOR',
                    'AUTHOR_NAME',
                    'AUTHOR_EMAIL',
                    'MODULE_NAMESPACE',
                ],
            ],
            'gitkeep' => false,
        ],
        'paths' => [
            'modules'   => base_path('modules'),
            'assets'    => public_path('modules'),
            'migration' => base_path('database/migrations'),
            'generator' => [
                'config'           => ['path' => 'Config', 'generate' => true],
                'command'          => ['path' => 'Console', 'generate' => true],
                'migration'        => ['path' => 'Database/migrations', 'generate' => true],
                'seeds'            => ['path' => 'Database/seeds', 'generate' => true],
                'factory'          => ['path' => 'Database/factories', 'generate' => true],
                'model'            => ['path' => 'Models', 'generate' => true],
                'controller'       => ['path' => 'Http/Controllers', 'generate' => true],
                'controller-admin' => ['path' => 'Http/Controllers/Admin', 'generate' => true],
                'controller-api'   => ['path' => 'Http/Controllers/Api', 'generate' => true],
                'filter'           => ['path' => 'Http/Middleware', 'generate' => true],
                'request'          => ['path' => 'Http/Requests', 'generate' => true],
                'routes'           => ['path' => 'Http/Routes', 'generate' => true],
                'provider'         => ['path' => 'Providers', 'generate' => true],
                'assets'           => ['path' => 'Resources/assets', 'generate' => true],
                'lang'             => ['path' => 'Resources/lang', 'generate' => true],
                'views'            => ['path' => 'Resources/views', 'generate' => true],
                'test'             => ['path' => 'tests', 'generate' => true],
                'repository'       => ['path' => 'Repositories', 'generate' => false],
                'event'            => ['path' => 'Events', 'generate' => false],
                'listener'         => ['path' => 'Listeners', 'generate' => true],
                'policies'         => ['path' => 'Policies', 'generate' => false],
                'rules'            => ['path' => 'Rules', 'generate' => false],
                'jobs'             => ['path' => 'Jobs', 'generate' => false],
                'emails'           => ['path' => 'Resources/Emails', 'generate' => false],
                'notifications'    => ['path' => 'Notifications', 'generate' => false],
                'resource'         => ['path' => 'Models/Transformers', 'generate' => false],
            ],
        ],
        /*
        |--------------------------------------------------------------------------
        | Scan Path
        |--------------------------------------------------------------------------
        |
        | Here you define which folder will be scanned. By default will scan vendor
        | directory. This is useful if you host the package in packagist website.
        |
        */
    
        'scan' => [
            'enabled' => false,
            'paths'   => [
                base_path('vendor/*/*'),
                base_path('modules/*'),
            ],
        ],
        /*
        |--------------------------------------------------------------------------
        | Composer File Template
        |--------------------------------------------------------------------------
        |
        | Here is the config for composer.json file, generated by this package
        |
        */
    
        'composer' => [
            'vendor' => '',
            'author' => [
                'name'  => '',
                'email' => '',
            ],
        ],
        /*
        |--------------------------------------------------------------------------
        | Caching
        |--------------------------------------------------------------------------
        |
        | Here is the config for setting up caching feature.
        |
        */
        'cache' => [
            'enabled'  => true,
            'key'      => 'phpvms-modules',
            'lifetime' => 10,
        ],
        /*
        |--------------------------------------------------------------------------
        | Choose what laravel-modules will register as custom namespaces.
        | Setting one to false will require you to register that part
        | in your own Service Provider class.
        |--------------------------------------------------------------------------
        */
        'register' => [
            'translations' => true,
        ],
    
        'activator'  => 'file',
        'activators' => [
            'file' => [
                'class'          => FileActivator::class,
                'statuses-file'  => config_path('modules_statuses.json'),
                'cache-key'      => 'activator.installed',
                'cache-lifetime' => 604800,
            ],
        ],
    ];
    

    I'm trying to debug with some people who are running into issues with generating modules; it looks like the service provider (TestModuleServiceProvider in this case wasn't generated). And it looks also like the caches (config, routes) didn't get cleared (I can't remember if this was supposed to be the case). It could also be that I'm missing some configuration or something in the upgrade to Laravel 7, but I haven't seen anything specific). Thanks!

    opened by nabeelio 28
  • Feature/allow submodule

    Feature/allow submodule

    Add the ability to create submodules like Tests/Test.

    1. I've distinguished between the name and base_name in src/Generators/ModuleGenerator.php; for instance, for Blog/Sub, the name will be Blog/Sub, but the base name will be Sub.
    2. I've considered any directory with a module.json a module, so, even if you have a directory that has just module.json file, and it is inside Modeuls path, thus this is considered a module, farther more, even u have more module.json in recursive directory inside Modules every one of them will be considered a module.
    3. I've created a test for the submodule case.
    opened by mshamaseen 26
  • How to use json translation files using modules? (Translation Strings As Keys)

    How to use json translation files using modules? (Translation Strings As Keys)

    I want to use translation strings as key, how to do it in laravel modules? https://laravel.com/docs/6.x/localization#using-translation-strings-as-keys

    I've tried adding the json file to modules lang folder. e.g. Modules\ModuleName\Resources\lang\id.json but laravel doesn't read it.

    Does laravel modules support Translation Strings As Keys? (Not short key translation).

    Thanks

    opened by dexcell 24
  • Lumen support

    Lumen support

    Support for Lumen:

    • Instead of injecting laravels application refactored to Illuminate\Container\Container that is extentend by both laravels and lumen applications.
    • In Lumen case namespaces ( haven't tested on laravel since I left it as it is ) must be loaded before registering module provider since it needs some configuration values. Loading these in boot() method will fail to init provider.
    • Requested changes from old PR.
    opened by deividaspetraitis 22
  • Take first from providers and reuse it

    Take first from providers and reuse it

    Take first from providers and reuse it, instead of generating misleading paths when having multiple namespaced vendors

    fixing https://github.com/nWidart/laravel-modules/issues/202

    opened by webmake 21
  • Livewire added

    Livewire added

    Making Components:

    Command Signature:

    php artisan module:make-livewire <Module> <Component> --view= --force --inline

    Example:

    php artisan module:make-livewire Core Pages/AboutPage
    
    php artisan module:make-livewire Core Pages\\AboutPage
    
    php artisan module:make-livewire Core pages.about-page
    

    Force create component if the class already exists:

    php artisan module:make-livewire Core Pages/AboutPage --force

    Component Files:

    Class: Modules/Core/Http/Livewire/Pages/AboutPage.php
    View: Modules/Core/Resources/views/livewire/pages/about-page.blade.php
    

    Inline Component:

    php artisan module:make-livewire Core Pages/AboutPage --inline

    Component File:

    Class: Modules/Core/Http/Livewire/Pages/AboutPage.php

    Extra Option (--view):

    You able to set custom view path for Component with (--view) option.

    Example -

    php artisan module:make-livewire Core Pages/AboutPage --view=pages/about
    
    or
    
    php artisan module:make-livewire Core Pages/AboutPage --view=pages.about
    

    Component Files:

    Class: Modules/Core/Http/Livewire/Pages/AboutPage.php
    View: Modules/Core/Resources/views/livewire/pages/about.blade.php
    

    Rendering Components:

    <livewire:{moudle-lower-name}::component-class-kebab-case />

    Example -

    <livewire:core::pages.about-page />

    stale 
    opened by mhmiton 19
  • Is it the best way to enable/disable module?

    Is it the best way to enable/disable module?

    Sorry, if this feels stupid!

    When I command "php artisan module:enable MyModule", it's overriding the status in module.json file! My concern is, MyModule has git repository and each time I change the status, I won't be able to git pull without "git stash"! Or should I git ignore the module.json file to overcome this situation?

    My understanding, it would be nice to make enable/disable by using database or any other config file but has to be out site of that module.

    Sorry if I am confusing! :(

    opened by bashet 19
  • How to use policies

    How to use policies

    Hello I'm trying to write and use a policy inside a module controller($this->authorize() method) no matter what I do it just doesn't work I tried to register my policy in a different provider (which extends from Illuminate\Foundation\Support\Providers\AuthServiceProvider ) but it doesn't work

    please help me

    thank you

    opened by MehrshadBaradaran 0
  • loadJsonTranslationsFrom doesn't have 2 parameters

    loadJsonTranslationsFrom doesn't have 2 parameters

    opened by Rattone 0
  • Add database management feature

    Add database management feature

    It's a newer version of #1163.

    • [x] Add database management feature
    • [x] Add command for migrating modules from .json to db
    • [x] Add publish migration
    • [x] Add Unit Tests
    • [x] Add version, keep module.json file
    opened by lamtranb 1
  • One question why don't you update RouteServiceProvider modules?

    One question why don't you update RouteServiceProvider modules?

    Hi been testing and this works.

    1. protected $moduleNamespace = 'Modules\Blog\Http\Controllers'; replace //protected $namespace = 'Modules\Base\Http\Controllers'; (must be commented).
    2. Remove all previous code just leave boot function. (add the following code shown in the image) Screenshot_18
    3. final result . Screenshot_19 @dcblogdev what do you think
    opened by wikigods 2
  • [Feature request] Sections support like Apiato

    [Feature request] Sections support like Apiato

    Looks like this

    modules/
       app/ <--- section
           authentication/ <--- module
           authorization/ <--- module
           user/ <--- module
       blog/ <--- section
           post/ <--- module
           comment/ <--- module
    
    opened by zdravstvuy1714 0
Releases(v9.0.6)
  • v9.0.6(Oct 28, 2022)

  • 9.0.5(Aug 31, 2022)

  • v9.0.4(Jul 28, 2022)

  • 9.0.1(Feb 28, 2022)

    Added

    • Added option to publish stubs for modules php artisan vendor:publish --provider="Nwidart\Modules\LaravelModulesServiceProvider" --tag="stubs"

    Changed

    • @iamine Added Anonymous migration class as default like in Laravel 9.0 #1363
    Source code(tar.gz)
    Source code(zip)
  • v9.0.0(Feb 10, 2022)

    Changed

    • Minimum PHP version to 8.0 for supporting Laravel 9
    • Laravel 9 version
    • Increased PHPUnit to 9.5
    • Increased Mockery to 1.4
    • Fixed test replaced expectsEvents with event fakes
    Source code(tar.gz)
    Source code(zip)
  • v8.3.0(Feb 10, 2022)

    In the config there's a breaking change for existing config files (fresh published configs are okay)

    To manually fix this import the commands class:

    use Nwidart\Modules\Commands;
    

    then update the commands array to prefix the command:

    'commands' => [
            Commands\CommandMakeCommand::class,
            Commands\ComponentClassMakeCommand::class,
            Commands\ComponentViewMakeCommand::class,
            Commands\ControllerMakeCommand::class,
            Commands\DisableCommand::class,
            Commands\DumpCommand::class,
            Commands\EnableCommand::class,
            Commands\EventMakeCommand::class,
            Commands\JobMakeCommand::class,
            Commands\ListenerMakeCommand::class,
            Commands\MailMakeCommand::class,
            Commands\MiddlewareMakeCommand::class,
            Commands\NotificationMakeCommand::class,
            Commands\ProviderMakeCommand::class,
            Commands\RouteProviderMakeCommand::class,
            Commands\InstallCommand::class,
            Commands\ListCommand::class,
            Commands\ModuleDeleteCommand::class,
            Commands\ModuleMakeCommand::class,
            Commands\FactoryMakeCommand::class,
            Commands\PolicyMakeCommand::class,
            Commands\RequestMakeCommand::class,
            Commands\RuleMakeCommand::class,
            Commands\MigrateCommand::class,
            Commands\MigrateRefreshCommand::class,
            Commands\MigrateResetCommand::class,
            Commands\MigrateRollbackCommand::class,
            Commands\MigrateStatusCommand::class,
            Commands\MigrationMakeCommand::class,
            Commands\ModelMakeCommand::class,
            Commands\PublishCommand::class,
            Commands\PublishConfigurationCommand::class,
            Commands\PublishMigrationCommand::class,
            Commands\PublishTranslationCommand::class,
            Commands\SeedCommand::class,
            Commands\SeedMakeCommand::class,
            Commands\SetupCommand::class,
            Commands\UnUseCommand::class,
            Commands\UpdateCommand::class,
            Commands\UseCommand::class,
            Commands\ResourceMakeCommand::class,
            Commands\TestMakeCommand::class,
            Commands\LaravelModulesV6Migrator::class,
     ],
    

    Fixed

    • The ability to override commands via config file.
    • Incorrectly placed config key
    • Class name when special characters are used in the rule name
    • Fix error on anonymous migration

    Changed

    • Changed View/Component to View/Components
    • Updated test snapshots for the MakeCommand test snapshots
    • Command stub signature from signature to name
    • Revert PR1171 which causes tests to fail

    Added

    • Added comands make class component and make view component
    • Test against php 8.0
    • Merge config in register method
    • Added optional controller flag to model generator command
    • Set module for make-controller command
    • Added tests for generating controller in model generator command
    • Added test for check if migration and controller flag are both present
    • Laravel mix v6 support
    Source code(tar.gz)
    Source code(zip)
  • 8.2.0(Nov 11, 2020)

    Added

    • New module:make-component command to generate laravel components

    Fixed

    • Fixed bug: Target class [Nwidart\Modules\Commands\] does not exist.
    Source code(tar.gz)
    Source code(zip)
  • 8.1.0(Nov 10, 2020)

    Added

    • Command management via configuration file
    • Laravel 8 Factories compatibility
    • New improved way to define controller types. --web, --api and --plain options.
    • New configuration option to make compose run in silent mode

    Changed

    • New generated commands now use the $signature property instead of $name
    • Fixed issue where order was used instead of priority
    Source code(tar.gz)
    Source code(zip)
  • 8.0.0(Oct 3, 2020)

  • 7.2.0(Jul 30, 2020)

    Added

    • Added return statements in artisan commands. Helpful to validate if something successfully ran. (#1026)

    Changed

    • Update JsonResource namespace, using the new Illuminate\Http\Resources\Json\JsonResource. (#969)
    • Enable command returns the status code (#978)
    • Removing module service provider from composer.json stub (#996)
    • Fixed custom stub path issue. Replacing a hardcoded stub path. (#1016)
    • Controller return type changed to Illuminate\Contracts\Support\Renderable. (#1020)
    • Change bigIncrements method to id (#1029)
    • Adding force option for module:seed (#1030)
    Source code(tar.gz)
    Source code(zip)
  • 7.1.0(Apr 14, 2020)

    Changed

    • php artsian module:enable (without any arguments) will enable all modules
    • php artsian module:disable (without any arguments) will disable all modules
    • Updating Laravel Mix version as well as cross-env.
    Source code(tar.gz)
    Source code(zip)
  • 7.0.0(Mar 26, 2020)

  • 6.2.0(Nov 12, 2019)

    Changed

    • Properly guessing the namespace from the path (in GeneratorPath class)
    • Fixing generation of resource file if the resource has been disabled to generate
    • Fix when using a custom service provider namespace, namespace is correctly referenced in module.json and compose.json
    • Fix when using custom service provider namespace, module path is correctly referenced in the RouteServiceProvider and ModuleServiceProvider
    • Fix when using a custom path for controllers in the controller stub
    Source code(tar.gz)
    Source code(zip)
  • 6.1.0(Nov 1, 2019)

    Added

    • Added new module:delete command

    Changed

    • Add optional path parameter to module_path helper (PR#861)
    • The default path of the module_statuses.json file has been moved to the Application's base path. This is to improve its visibility and the fact that it can be committed by default.
    • Throw an exception when no proper activator class was configured
    Source code(tar.gz)
    Source code(zip)
  • 6.0.0(Sep 19, 2019)

    Added

    • New File Activator feature. PR #790 from @ryssbowh

      This feature changes how modules are activated and de-activated. Currently module statuses are stored on disk, this features adds the possibility of storing this status information in a database.

      Use the command php artisan module:v6:migrate to have old modules active status migrated to the new system.

    Changed

    • Alternate way to define the namespace of modules in PR #776 by @daison12006013

      This allows to have the content of the module under an src/ folder for example.

    • BREAKING New way to handle active and inactive modules.

      Modules don't store their active status in their module.json file anymore, but in a file under the storage folder. Run php artisan module:v6:migrate to use the new system.

    • BREAKING Renamed method enabled to isEnabled in \Nwidart\Modules\Module.

    • BREAKING Renamed method disabled to isDisabled in \Nwidart\Modules\Module.

    • BREAKING Renamed method enabled to isEnabled in \Nwidart\Modules\FileRepository.

    • BREAKING Renamed method disabled to isDisabled in \Nwidart\Modules\FileRepository.

    • BREAKING Removed the __get magic method on the \Nwidart\Modules\Module class. Use get() or json()->get() instead.

    • The module:make-listener command now correctly uses the namespace configuration

    • The generated Factories now has type hints for the \Illuminate\Database\Eloquent\Factory class

    • Improved foreign key constraint generation

    • Exception handling in the SeedCommand has been improved

    Source code(tar.gz)
    Source code(zip)
  • 5.1.0(Sep 5, 2019)

    Changed

    • Replacing @stop with @endsection in the view stub file
    • Module class does not extend Laravel's Service Provider class anymore
    • Improve foreign key constraint generation
    Source code(tar.gz)
    Source code(zip)
  • 5.0.1(May 11, 2019)

    Added

    • artisan module:route-provider has a --force option to overwrite the existing file

    Changed

    • Fixing the RouteServiceProvider generation to properly use the routes/web and routes/api stubs
    Source code(tar.gz)
    Source code(zip)
  • 5.0.0(Mar 18, 2019)

    Added

    • Laravel 5.8 support

    Changed

    • Deprecated string and array methods have been replaced
    • Fixed caching not being cleared after disabling and enabling modules
    • Update Route Provider stub to not affect the root namespace of the URL generator (#727)

    Removed

    • PHP 7.1 support
    Source code(tar.gz)
    Source code(zip)
  • 4.1.0(Mar 4, 2019)

  • 4.0.0(Sep 30, 2018)

    Added

    • New way of handling routes by default using a RouteServiceProvider (instead of start.php)
    • Laravel 5.7 support

    Changed

    • Allow class resolution on short name and abstract
    • module:seed accepts a --class option
    Source code(tar.gz)
    Source code(zip)
  • 3.3.1(Jul 13, 2018)

  • 3.3.0(Jun 21, 2018)

  • 3.2.0(Apr 16, 2018)

    Added

    • Added possibility to update all modules at once if any not specified (PR #523)

    Changed

    • Mix: Fix css relative urls by changing the route folder (PR #521)
    • Mix: Prevents every build from deleting previous Mix config file (PR #521)
    Source code(tar.gz)
    Source code(zip)
  • 3.1.0(Apr 1, 2018)

    Added

    • Laravel mix configuration (https://nwidart.com/laravel-modules/v3/basic-usage/compiling-assets)

    Changed

    • Allow symlinks in module path
    • Returns the parameter --class to the SeedCommand.
    • Generate folders recursively
    • Removing link that has become a 404
    • Fixed seed command exception typehint

    Removed

    • Removed the optimize command on the module:make-migration command
    Source code(tar.gz)
    Source code(zip)
  • 3.0.1(Feb 16, 2018)

  • 3.0.0(Feb 14, 2018)

    Added

    • Added support for laravel 5.6
    • Using phpunit 7

    Changed

    • BC: Repository class: renamed enabled to allEnabled
    • BC: Repository class: renamed disabled to allDisabled
    • BC: Repository class: renamed active to enabled
    • BC: Repository class: renamed notActive to disabled

    Removed

    • Dropped php 7.0 support
    • BC: Module class: Deprecated active() method, use enabled()
    • BC: Module class: Deprecated notActive() method, use disabled()
    • BC: Repository class: Deprecated addPath() method, use addLocation()
    • BC: Repository class: Deprecated get() method, use find()
    • BC: Repository class: Deprecated getUsed() method, use getUsedNow()
    Source code(tar.gz)
    Source code(zip)
  • 2.7.0(Jan 13, 2018)

    Changed

    • Rename the before method to boot in the RouterServiceProvider stub file
    • Fixing caching issue if modules were loaded from a different directory
    • Fixing how modules are loaded from vendor directory (#423 #417)
    • Update to Mockery 1.0
    • use default file stubs only if the override does not exist
    • Fix non well formed numeric value in seed command
    Source code(tar.gz)
    Source code(zip)
  • 2.6.0(Nov 7, 2017)

    Added

    • Ability to customise the destination folder & namespace of a generated class
    • Added php artisan module:migrate-status command
    • Added config_path() helper for Lumen
    • Added views tag to view config in ServiceProvider
    • Added package auto discovery for laravel 5.5 in generated module composer.json

    Changed

    • Adding the ability to correctly load modules from multiple locations, together
    • Custom seeder path now also used in the module:seed command
    • updated readme on how to install laravel-modules in Lumen
    Source code(tar.gz)
    Source code(zip)
Owner
Nicolas Widart
Freelance developer & consultant. Laravel specialist. Spring fan. React and Vue user. Open-source advocate. New technologies geek. Apple fan. @AsgardCms creator
Nicolas Widart
Realtime Notification Module With Laravel & Pusher

About Noftiy Module This module to organize the notification process in real time without need to reload page, using PHP language with Laravel framewo

Mohamed Magdy 1 Jan 9, 2022
Le module PrestaShop Dronic© permet très facilement d'ajouter à votre site Prestashop un configurateur de drone FPV !

Description Le module PrestaShop Dronic© permet très facilement d'ajouter à votre site Prestashop un configurateur de drone FPV ! Ce module utilise de

Theo 3 Nov 19, 2021
Module for PageBuilder Support for M2.4.3 and future versions.

Magento 2 DataPatchCreator Page Builder Compatibility Plugin Plugin for PageBuilder to remove encoding of HTML special characters done by Magento\Page

eCommerce Nanobots 4 Dec 27, 2022
webtrees module: enhanced clippings cart with more functions to add records to the clippings cart and to start actions on these records

webtrees module hh_clippings_cart_enhanced !!! This is an alpha version! Do not use it in a productive webtrees system! !!! This webtrees custom modul

Hermann Hartenthaler 1 Sep 18, 2022
Joy VoyagerDatatable module adds Yajra DataTable to Voyager.

Joy VoyagerDatatable This Laravel/Voyager module adds Yajra Async/Ajax DataTable to Voyager. By ?? Ramakant Gangwar. Prerequisites Composer Installed

Ramakant Gangwar 10 Dec 19, 2022
A web app for detecting backend technologies used in a web app, Based on wappalyzer node module

About Techdetector This a web fingerprinting application, it detects back end technologies of a given domain by using the node module wappalyzer. And

Shobi 17 Dec 30, 2022
Shell script for Git module deployment with include/exclude filters.

Deploy multiple Git repositories in an unique folder modgit is a shell script for deploying multiple Git repositories in root folder of any project, w

Johann Reinké 175 Nov 22, 2022
File manager module for the Lumen PHP framework.

Lumen File Manager File manager module for the Lumen PHP framework. Please note that this module is still under active development. NOTE: Branch 5.1 i

Digia 40 Aug 20, 2022
Laravel Users | A Laravel Users CRUD Management Package

A Users Management Package that includes all necessary routes, views, models, and controllers for a user management dashboard and associated pages for managing Laravels built in user scaffolding. Built for Laravel 5.2, 5.3, 5.4, 5.5, 5.6, 5.7, 5.8, 6.0, 7.0 and 8.0.

Jeremy Kenedy 393 Nov 28, 2022
Packagit is amazing laravel modules management, you could manage huge project with many separate laravel modules.

Packagit is amazing laravel modules management, you could manage huge project with many separate laravel modules.

null 364 Dec 12, 2022
HTML Meta Tags management package available for for Laravel 5.*

HTML Meta Tags management package available for Laravel 5/6/7/8 With this package you can manage header Meta Tags from Laravel controllers. If you wan

Lito 182 Dec 5, 2022
Theme and asset management for laravel

Laravel-Themevel Themevel is a Laravel theme and asset management package. You can easily integrate this package with any Laravel based project. Featu

Shipu Ahamed 339 Dec 23, 2022
An in-app database management UI for Laravel applications. ⚡️

:package_description This repo can be used to scaffold a Laravel package. Follow these steps to get started: Press the "Use template" button at the to

Ryan Chandler 3 Nov 13, 2021
Laravel Restaurant Management System Project

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Benjdia Saad 8 Mar 26, 2022
Theme and asset management for laravel

Laravel-Themevel Themevel is a Laravel theme and asset management package. You can easily integrate this package with any Laravel based project. Featu

Shipu Ahamed 339 Dec 23, 2022
Manage your staff from one place. Featuring Staff leave management 🏖, payslips 💵 generation & emailing, messaging 📨and more 🛠! Built with ❤️ with Laravel

Staff Management System This little buddy can help you manage your staff database! Built with ?? with Laravel #FEATURES 1 Staff management/ database S

Ezekiel Oladejo 45 Jan 3, 2023
Leads Management using Laravel & AJAX

Leads Manager v1.00 - Built-in Laravel/AJAX You can manage your leads, add, update, or even delete without refreshing , using jQuery & AJAX This is a

Med Reda Kamal 0 Jul 28, 2022
Attendize is an open-source ticketing and event management application built using the Laravel PHP framework

Attendize is an open-source ticketing and event management application built using the Laravel PHP framework. Attendize allows event organisers to sel

Attendize 3.6k Dec 27, 2022
Simple address and contact management for Laravel with automatically geocoding to add longitude and latitude

Laravel Addresses Simple address and contact management for Laravel with automatically geocoding to add longitude and latitude. Installation Require t

Chantouch Sek 2 Apr 4, 2022