How to structure a modular app in Laravel 5?

后端 未结 6 1348
生来不讨喜
生来不讨喜 2020-12-22 15:30

I would like to divide my application in modules. For instance, there would be a \"core\" modules that contains the basic login functionality, app layout/formatting (CSS etc

6条回答
  •  自闭症患者
    2020-12-22 16:08

    pingpong/modules is a laravel package which created to manage your large laravel app using modules. Module is like a laravel package for easy structure, it have some views, controllers or models.

    It's working in both Laravel 4 and Laravel 5.

    To install through composer, simply put the following in your composer.json file:

    {
        "require": {
            "pingpong/modules": "~2.1"
        }
    }
    

    And then run composer install to fetch the package.

    To create a new module you can simply run :

    php artisan module:make

    - Required. The name of module will be created. Create a new module

    php artisan module:make Blog

    Create multiple modules

    php artisan module:make Blog User Auth

    for more visit: https://github.com/pingpong-labs/modules

提交回复
热议问题