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)24012MITPHPPHP &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 1mo ago

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

37

—

LowBetter than 83% of packages

Maintenance45

Moderate activity, may be stable

Popularity19

Limited adoption so far

Community9

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

429d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8fec791dd8cb208559f10b975492a396219d1c0bcafd2780e2d1d5bc332f5fa9?d=identicon)[arwahyu01](/maintainers/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

[nolimits4web/swiper

Most modern mobile touch slider and framework with hardware accelerated transitions

41.8k177.2k1](/packages/nolimits4web-swiper)[laravel/prompts

Add beautiful and user-friendly forms to your command-line applications.

712181.8M596](/packages/laravel-prompts)[cakephp/chronos

A simple API extension for DateTime.

1.4k47.7M121](/packages/cakephp-chronos)[laravel/pail

Easily delve into your Laravel application's log files directly from the command line.

91545.3M590](/packages/laravel-pail)[nette/bootstrap

🅱 Nette Bootstrap: the simple way to configure and bootstrap your Nette application.

68535.8M592](/packages/nette-bootstrap)[cakephp/utility

CakePHP Utility classes such as Inflector, String, Hash, and Security

12127.1M63](/packages/cakephp-utility)

PHPackages © 2026

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