Download the PHP package arwp/mvc without Composer
On this page you can find all versions of the php package arwp/mvc. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package mvc
Short Description For building Model-View-Controller (MVC) pattern in laravel
License MIT
Informations about the package mvc
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](https://github.com/arwahyu01)
Requirements
- Use This Package: arwp/main-master
- Laravel: 11.0 or higher
- PHP: 8.2 or higher
Features
-
Module Generation:
Use the commandphp 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.
- Run
Installation
Install the package via Composer:
Creating a New Module
To create a new module, execute:
Examples:
-
Standard Module Creation:
-
Customized Component Generation:
Generate only specific components (e.g., model and view) by using flags:
-
Single Component Creation:
For example, to generate only views:
Deleting a Module
To remove a module along with its associated files and database tables, run:
Setup and Configuration
-
Register the Service Provider:
Add the service provider in yourconfig/app.php
: -
Publish the Package Resources:
Publish the necessary resource files by running:This command will publish:
config/mvc.php
routes/mvc-route.php
Console/Commands/createMvc.php
Console/Commands/deleteMvc.php
-
Configure Routing:
Update yourRouteServiceProvider.php
to include the MVC routes. For example: -
Customize Paths:
In the publishedconfig/mvc.php
file, adjust the paths to suit your project structure:To modify the default route file, simply update the
path_route
setting accordingly:Lastly, ensure your designated route file (e.g.,
routes/web.php
) contains the following marker:
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! 🚀