PHPackages                             learn2torials/laravel-modular - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. learn2torials/laravel-modular

ActiveProject[Framework](/categories/framework)

learn2torials/laravel-modular
=============================

Laravel Modular App Generator Plugin

1.0.9(4y ago)145886MITPHPPHP &gt;=7.0

Since Jan 6Pushed 4y ago1 watchersCompare

[ Source](https://github.com/learn2torials/laravel-modular)[ Packagist](https://packagist.org/packages/learn2torials/laravel-modular)[ Docs](https://learn2torials.com)[ RSS](/packages/learn2torials-laravel-modular/feed)WikiDiscussions master Synced today

READMEChangelog (10)DependenciesVersions (8)Used By (0)

Laravel Modular App Plugin
==========================

[](#laravel-modular-app-plugin)

[![Laravel](https://camo.githubusercontent.com/b2b6acea0535d68fdfc62130a1cf57933b977f79a159ddb1bd2521f4809740b9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c61726176656c2d352d6f72616e67652e737667)](http://laravel.com)[![Release](https://camo.githubusercontent.com/486a15a0e975586f8924b1d66e81153c55363e504d91aa10d3734ca022f4c314/68747470733a2f2f706f7365722e707567782e6f72672f6c6561726e32746f7269616c732f6c61726176656c2d6d6f64756c61722f762f737461626c65)](https://github.com/learn2torials/laravel-modular/releases)[![Issues](https://camo.githubusercontent.com/ea2742c94cc01f941d6eb736fe648e0073f5851ad547e8c9a01ff573a4eb9278/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f6c6561726e32746f7269616c732f6c61726176656c2d6d6f64756c61722e737667)](https://camo.githubusercontent.com/ea2742c94cc01f941d6eb736fe648e0073f5851ad547e8c9a01ff573a4eb9278/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f6c6561726e32746f7269616c732f6c61726176656c2d6d6f64756c61722e737667)[![Licence](https://camo.githubusercontent.com/bd14d063be67647067603e800a119303e5d95824aab5c6ee8851821ce7830f78/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6c6561726e32746f7269616c732f6c61726176656c2d6d6f64756c61722e737667)](https://camo.githubusercontent.com/bd14d063be67647067603e800a119303e5d95824aab5c6ee8851821ce7830f78/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6c6561726e32746f7269616c732f6c61726176656c2d6d6f64756c61722e737667)

Turn your existing laravel app into modular application. Laravel modular plugin allows you to write modular plugins for laravel.

Let's say, you are building a blog application. Your blog needs to have following features:

- comments
- blog post
- user management etc..

You can turn this features into a module and bundle your logic so that you can easily use this module for your other projects. You can easily turn on/off your module.

Plugin Requirements
===================

[](#plugin-requirements)

- PHP &gt;= 7.2
- Laravel &gt;= 6.0

Newer Laravel Plugin
====================

[](#newer-laravel-plugin)

For older version &gt;= 8.0 of Laravel use this plugin [Modular Laravel](https://packagist.org/packages/learn2torials/modular-laravel)

How to install this plugin
==========================

[](#how-to-install-this-plugin)

Run following command to your existing project.

```

# install this plugin
composer require "learn2torials/laravel-modular"

# create module using artisan
php artisan make:module comments

```

Above command will create a new directory under App/Modules with following structure.

```
App
|- Modules
   |-- Comments
      |-- Controllers
      |-- Models
      |-- Views
      |-- Migrations
         |-- Seeder
      |-- Translations
         |-- en
             |-- general.php
         |-- fr
             |-- general.php
      |-- config.php
      |-- routes.php

```

Next, once this folder structure is generated you can turn on this module by creating console.php file in *config* directory.

```
