2017 © Pedro Pelรกez
 

library modularize

Generate modular structure files for laravel

image

norbybaru/modularize

Generate modular structure files for laravel

  • Sunday, June 3, 2018
  • by norbybaru
  • Repository
  • 1 Watchers
  • 0 Stars
  • 21 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

Modularize

The package encourage implementation of modular app. You can easily generate modules with this package for your Laravel app., (*1)

This package support Laravel 5.3 +, (*2)

Installation

Run the following command from your projects root, (*3)

composer require norbybaru/modularize

Config

Publish configuration, (*4)

php artisan vendor:publish --provider="NorbyBaru\Modularize\ModularizeServiceProvider" --tag="modularize-config"

Usage

Open your terminal and run command:, (*5)

php artisan module:generate -h 

You will see output with all different options to use. Simple example will be to generate a user module directory, run command:, (*6)

php artisan module:generate user   

This will generate files with following structures:, (*7)

laravel/
    app/
    โ””โ”€โ”€ Modules/
        โ””โ”€โ”€ User/
            โ”œโ”€โ”€ Controllers/
            โ”‚   โ””โ”€โ”€ UserController.php
            โ”œโ”€โ”€ Models/
            โ”‚   โ””โ”€โ”€ User.php
            โ”œโ”€โ”€ Requests/
            โ”‚   โ””โ”€โ”€ UserRequest.php
            โ”œโ”€โ”€ Views/
            โ”‚   โ””โ”€โ”€ index.blade.php
            โ”œโ”€โ”€ Translations/
            โ”‚   โ””โ”€โ”€ en/
            โ”‚       โ””โ”€โ”€ example.php
            โ”œโ”€โ”€ routes
            โ”‚   โ”œโ”€โ”€ api.php
            โ”‚   โ””โ”€โ”€ web.php
            โ””โ”€โ”€ Helper.php

The package allow you to group modules as well with command:, (*8)

php artisan module:generate user --group=admin

This will output:, (*9)

laravel/
    app/
    โ””โ”€โ”€ Modules/
        โ””โ”€โ”€ Admin/
            โ””โ”€โ”€ User/
                โ”œโ”€โ”€ Controllers/
                โ”‚   โ””โ”€โ”€ UserController.php
                โ”œโ”€โ”€ Models/
                โ”‚   โ””โ”€โ”€ User.php
                โ”œโ”€โ”€ Requests/
                โ”‚   โ””โ”€โ”€ UserRequest.php
                โ”œโ”€โ”€ Views/
                โ”‚   โ””โ”€โ”€ index.blade.php
                โ”œโ”€โ”€ Translations/
                โ”‚   โ””โ”€โ”€ en/
                โ”‚       โ””โ”€โ”€ example.php
                โ”œโ”€โ”€ routes
                โ”‚   โ”œโ”€โ”€ api.php
                โ”‚   โ””โ”€โ”€ web.php
                โ””โ”€โ”€ Helper.php

Credits to: - "Modular Structure in Laravel 5" tutorial - "Artem Schander - L5 Modular", (*10)

The Versions

03/06 2018

dev-master

9999999-dev https://github.com/norbybaru/modularize

Generate modular structure files for laravel

  Sources   Download

MIT

The Requires

 

by Norby Baruani

laravel structure module modules modular laravel-modular modularize norbybaru norby baru

03/06 2018

1.2.1

1.2.1.0 https://github.com/norbybaru/modularize

Generate modular structure files for laravel

  Sources   Download

MIT

The Requires

 

by Norby Baruani

laravel structure module modules modular laravel-modular modularize norbybaru norby baru

13/05 2018

1.1.1

1.1.1.0 https://github.com/norbybaru/modularize

Generate modular structure files for laravel

  Sources   Download

MIT

The Requires

 

by Norby Baruani

laravel structure module modules modular laravel-modular modularize norbybaru norby baru

13/05 2018

1.1.0

1.1.0.0

Generate modular structure files for laravel

  Sources   Download

MIT

The Requires

 

by Norby Baruani

laravel structure module pattern modules modular laravel-modular artem schander modularize norbybaru norby baru

07/05 2018

1.0.0

1.0.0.0

Generate modular structure files for laravel

  Sources   Download

MIT

The Requires

 

by Norby Baruani

laravel structure module pattern modules modular laravel-modular artem schander modularize norbybaru norby baru