Skip to content

amirhnajafiz/model-view-controller

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Implementing simple Model View Controller website with PHP. This is the base of a MVC project. All routes and models and controllers are already setupt. Just clone the project and use it.

How to use?

This project will build a basic website based on MVC. To customize it, first install composer.

Clone the project by:

git clone https://github.com/amirhnajafiz/PHP-MVC.git

Enter the main dir:

cd Basic-MVC

Update the composer for vendor creation:

composer update

All good, if you want to rename the package, go to composer.json and change the settings and update the composer again.

Now you are good to create your controllers and models.
You have to set the database configurations in /models/Database.php .

And finaly run the server by the following command:

php -S 127.0.0.1:8080 -t public

All done.