PHPackages                             arwp/mvc - 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. arwp/mvc

ActiveLibrary[Framework](/categories/framework)

arwp/mvc
========

For building Model-View-Controller (MVC) pattern in laravel

v1.2.0(1y ago)24191MITPHPPHP &gt;=8.1

Since Jun 2Pushed 1y ago1 watchersCompare

[ Source](https://github.com/arwahyu01/mvc-builder)[ Packagist](https://packagist.org/packages/arwp/mvc)[ RSS](/packages/arwp-mvc/feed)WikiDiscussions main Synced today

READMEChangelog (10)Dependencies (1)Versions (24)Used By (0)

MVC Generator
-------------

[](#mvc-generator)

 **MVC Generator** is a powerful package designed to streamline the creation of new modules with full CRUD functionality and generate corresponding views. This tool is an invaluable asset for accelerating your Laravel projects.

Crafted specifically for [arwp/main-master](https://packagist.org/packages/arwp/main-master), its code structure is optimized for seamless integration.

 Made with ❤️ by \[ARWP\]()

---

Requirements
------------

[](#requirements)

- **Use This Package:** [arwp/main-master](https://packagist.org/packages/arwp/main-master)
- **Laravel:** 11.0 or higher
- **PHP:** 8.2 or higher

Features
--------

[](#features)

- **Module Generation:**
    Use the command `php artisan make:mvc [model name]` to generate a new module that includes:

    - ✅ **Controller:** Integrated with complete CRUD functionality.
    - ✅ **Model:** Configured with fillable fields and defined relationships.
    - ✅ **Migration:** Automatically creates the required database tables and relationships.
    - ✅ **Views:** Pre-built views supporting CRUD operations.
    - ✅ **Route:** A dedicated route for module operations.
- **Module Deletion:**

    - Run `php artisan delete:mvc [name]` to delete MVC files one by one (with confirmation prompts).
    - Run `php artisan delete:mvc [name] --all` to remove all related files and database tables.

Installation
------------

[](#installation)

Install the package via Composer:

```
composer require arwp/mvc
```

Creating a New Module
---------------------

[](#creating-a-new-module)

To create a new module, execute:

```
php artisan make:mvc [model name]
```

**Examples:**

- **Standard Module Creation:**

    ```
    php artisan make:mvc User
    ```
- **Customized Component Generation:**

    Generate only specific components (e.g., model and view) by using flags:

    ```
    php artisan make:mvc User mv  # 'm' for model, 'v' for view, 'c' for controller, 't' for migration, 'r' for route
    ```
- **Single Component Creation:**

    For example, to generate only views:

    ```
    php artisan make:mvc User view
    ```

Deleting a Module
-----------------

[](#deleting-a-module)

To remove a module along with its associated files and database tables, run:

```
php artisan delete:mvc [model name]
```

Setup and Configuration
-----------------------

[](#setup-and-configuration)

1. **Register the Service Provider:**
    Add the service provider in your `config/app.php`:

    ```
    'providers' => [
        // ...
        Arwp\Mvc\MvcServiceProvider::class,
        // ...
    ],
    ```
2. **Publish the Package Resources:**
    Publish the necessary resource files by running:

    ```
    php artisan vendor:publish --provider="Arwp\Mvc\MvcServiceProvider"
    ```

    This command will publish:

    - `config/mvc.php`
    - `routes/mvc-route.php`
    - `Console/Commands/createMvc.php`
    - `Console/Commands/deleteMvc.php`
3. **Configure Routing:**
    Update your `RouteServiceProvider.php` to include the MVC routes. For example:

    ```
    public function boot()
    {
        // ...
        Route::middleware(['web', 'auth', 'backend'])
            ->namespace('App\Http\Controllers\Backend')
            ->group(base_path('routes/mvc-route.php'));
        // ...
    }
    ```
4. **Customize Paths:**
    In the published `config/mvc.php` file, adjust the paths to suit your project structure:

    ```
    return [
        'path_controller' => 'app/Http/Controllers/Backend', // Controller folder path
        'path_model'      => 'app/Models',                     // Model folder path
        'path_view'       => 'views/backend',                  // View folder path (e.g., views/backend or views/frontend)
        'path_route'      => 'routes/mvc-route.php',           // Route file path (default: routes/mvc-route.php)
        'route_prefix'    => '',                               // Optional route prefix (e.g., backend, admin)
    ];
    ```

    To modify the default route file, simply update the `path_route` setting accordingly:

    ```
    return [
        // ...
        'path_route' => 'routes/web.php', // Change this to your desired route file path
        // ...
    ];
    ```

    Lastly, ensure your designated route file (e.g., `routes/web.php`) contains the following marker:

    ```
    //{{route replacer}} DON'T REMOVE THIS LINE
    ```

License
-------

[](#license)

MVC Generator is released under the [MIT License](LICENSE).
-----------------------------------------------------------

[](#mvc-generator-is-released-under-the-mit-license)

MVC Generator is designed to enhance the efficiency and simplicity of your development workflow. If you find this project valuable, your support with a star ⭐️ is greatly appreciated. Thank you for your contribution and happy coding! 🚀

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance42

Moderate activity, may be stable

Popularity18

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~29 days

Recently: every ~108 days

Total

23

Last Release

475d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/24684140?v=4)[Ar Wahyu Pradana](/maintainers/arwahyu01)[@arwahyu01](https://github.com/arwahyu01)

---

Top Contributors

[![arwahyu01](https://avatars.githubusercontent.com/u/24684140?v=4)](https://github.com/arwahyu01 "arwahyu01 (10 commits)")

### Embed Badge

![Health badge](/badges/arwp-mvc/health.svg)

```
[![Health](https://phpackages.com/badges/arwp-mvc/health.svg)](https://phpackages.com/packages/arwp-mvc)
```

###  Alternatives

[grumpydictator/firefly-iii

Firefly III: a personal finances manager.

23.9k69.5k](/packages/grumpydictator-firefly-iii)[nasirkhan/laravel-starter

A CMS like modular Laravel starter project.

1.4k2.7k](/packages/nasirkhan-laravel-starter)[sebastienheyd/boilerplate

Laravel Boilerplate based on AdminLTE 3 with blade components, user management, roles, permissions, logs viewer, ...

29420.1k3](/packages/sebastienheyd-boilerplate)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
