Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Generates Laravel modules

License

NotificationsYou must be signed in to change notification settings

norbybaru/modularize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The package encourage implementation of modular app.You can easily generate modules with this package for your Laravel app.

This package support Laravel 5.3 +

Installation

Run the following command from your projects root

composerrequire norbybaru/modularize

For Laravel versions lower than 5.5, this step is important after running above script.

  • Open yourconfig/app.php file and add custom service provider:
NorbyBaru\Modularize\ModularizeServiceProvider::class

Usage

Open your terminal and run command:

php artisan module:generate -h

You will see output with all different options to use.Simple example will be to generate auser module directory, run command:

php artisan module:generate user

This will generate files with following structures:

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:

php artisan module:generate user --group=admin

This will output:

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:


[8]ページ先頭

©2009-2025 Movatter.jp