amirhnajafiz/basic_mvc

There is no license information available for the latest version (1.0.0) of this package.

Simple MVC architecture website by PHP

1.0.0 2021-08-21 07:04 UTC

This package is auto-updated.

Last update: 2024-04-28 15:52:04 UTC


README

demo.png


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.