Skip to content

crjoseabraham/php-mvc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pure PHP Ready to use MVC structure

This is a personal project I made to teach myself how MVC works so I can use it for future projects

Installation

  1. Download as .zip or clone this repo using
    git clone https://github.com/crjoseabraham/php-mvc.git
  2. Import the data/todo_db.sql file to phpMyAdmin
  3. Install composer
    https://getcomposer.org/download/
  4. Run composer install
  5. Start your Apache server and go to http://localhost/php-mvc

Your done :)

Project structure

As most MVC frameworks, this project flows through public/index.php and loads the correspondant page base on the URL

php-mvc/ config/ # Database credentials, utility functions, constants used frequently data/ # SQL database file public/ # Accessible files. What final users see css/ # Compiled css file js/ # Compiled javascript file index.php # Starting point for the entire app src/ # Application source code app/ # Router class, routes.php controllers/ # Controller classes models/ # Model classes views/ # Views .htaccess # Make src/ unaccessible for users vendor/ # Composer files, autoloader !ignored .gitignore # Files/folders to be ignored by version control .htaccess # Redirect everything to public/ folder composer.json # Composer dependency file 

About

Vanilla PHP ready to use MVC structure with router and database class

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages