Some years ago I taught a programming course for a private training school. I built a simple ecommerce with the students. This ecommerce was based on a simple MVC framework based on PHP. Then, people who have continued with code and programming, already had a smattering of what means MVC before get their hands on a real framework. With this repo I am going to show you how create a simple PHP application following the MVC pattern (Model-View-Controller).
PHP >=7.1.20 Composer
PHP 7.1.20 Apache
git clone https://github.com/gmaccario/simple-mvc-php-framework.git
Or download the package from Github.
After the installation on your local or container, run the following command:
composer install
- Set up and run your webserver (e.g. Apache);
- Open your browser;
- Go to the index page (often localhost).
Note: if you decided to put the framework into a subfolder, open /config/config.php and set up the name of the subfolder here URL_SUBFOLDER
https://www.giuseppemaccario.com/how-to-build-a-simple-php-mvc-framework/