minionfactory/module-factory

此包已被废弃,不再维护。作者建议使用 nwidart/laravel-modules 包。

我在 Laravel 中的模块实现。

v1.3.5 2024-02-20 17:30 UTC

This package is auto-updated.

Last update: 2024-02-20 17:30:38 UTC


README

Software License

介绍

Module Factory 是一个简单的包,用于将 Laravel 组织成模块。它适用于小型项目,但对于大型项目,随着文件数量的增加可能会变得难以管理。此包允许您将文件结构化为模块,布局与 Laravel 本身相似。

app
    -Http
    -Modules
        -FullComponent
            -Config
                setup.php
            -Controllers
                PageController.php
                AdminController.php
            -Events
                -Listeners
                    PageSave.php
            -Policies
                PagePolicy.php
            -Routes
                web.php
                api.php
            -Shortcodes (optional)
                page-list.php
            -Views
                page.blade.php
                index.blade.php
        -PartialComponent
            -Controllers
                ShortcodeController.php
            -Shortcodes (optional)
                just-shortcode.php
            -Views
                list.blade.php

在上面的例子中,ShortcodeController 应该具有以下命名空间

namespace App\Modules\PartialComponent\Controllers;