Skip to content

BevilaquaBruno/generatormvc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MVC pattern generator with PHP 👌

this project it's useful to learn about how to manage files with php and do something like composer, but composer use the .phar php files, here i don't, You can use this or fork and edit for your project pattern.

In your project you will have created before:

  • 📂 app
    • 📂 controllers
    • 📂 models
    • 📂 views

Files:

  1. The base folder have the files and the pattern code inside those files.

  2. The generatormvc.bat file execute the generatormvc.php, then this file use your commands to create the MVC files.

  3. The generatormvcscript.iss file it's a inno setup code used to create an executable file

Commands:

Base command:

generatormvc <func> <type> <name>

generatormvc: base command.

<func>: what you want to do, so far it has only 2 commands: create to create files and delete to delete files

<type>: the type you want: mvc to create all, controller to create only a controller, model to create only a model or view to create a folder and a .html, .css and .js files

<name>: the name you want for the files:

If you choose product for the name:
  • 📂 app
    • 📂 controllers
      • 📄 controllerProduct.php
    • 📂 models
      • 📄 modelProduct.php
    • 📂 views
      • 📂 product
        • 📄 product.html
        • 📄 product.css
        • 📄 product.js