team-optimus/modularavel

A laravel 5|6 package to create a better house keeping of modules.

Installs: 170

Dependents: 0

Suggesters: 0

Security: 0

Type:laravel-package

v0.1.3 2021-05-11 14:30 UTC

This package is auto-updated.

Last update: 2024-06-11 21:29:32 UTC


README

Description

A laravel package to create a better house keeping of modules. It helps the developer to make a module in easiest way as possible. In one command, it will create necessary files you need in each module and it is presented as follow:

laravel/
    app/
    └── Modules/
        └── YourClass/
            ├── Controllers/
            │   └── YourClassController.php
            ├── Models/
            │   └── YourClass.php
            ├── Repositories/
            │   └── YourClassRepository.php
            └── Requests/
             	└── YourClassRequests.php

and of course! you can change the path of each files via package configuration.

Installation

Execute the following command to get the latest version of the package:

composer require team-optimus/modularavel

Optionally, In your config/app.php add TeamOptimus\Modularavel\Providers\ModularServiceProvider::class to the end of the providers array:

'providers' => [
    ...
    TeamOptimus\Modularavel\Providers\ModularServiceProvider::class,
],

Go to App\Provider\RouteServiceProvider and change the $namespace property to

`php protected $namespace = 'App'; `

Publish Configuration

php artisan vendor:publish --provider="TeamOptimus\Modularavel\Providers\ModularServiceProvider" 

Usage

Creating a complete modular housekeeped files.

php artisan make:modular Post

Creating a single file.

php artisan make:mod-controller Post

php artisan make:mod-repository Post

php artisan make:mod-request Post

Appending route samples.

php artisan modular:route Post

Troubleshooting

None for now.