Skip to content

Lepelley/MVC-PHP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MVC-PHP

Mini framework MVC with PHP (example of project with : https://www.github.com/Leyzou/Portfolio).

Configuration

Configure Model/Manager.php file to adapt it to your project.

Architecture explication

  • controller
  • controller/backend.php
  • controller/frontend.php
  • model
  • model/Manager.php : file to include in every Manager you create, contains the connection to your database with your logins
  • public
  • public/css
  • public/images
  • public/js
  • vendor : put the external libraries you use here
  • view : contains the view of your pages and the templates you use
  • view/backend
  • view/frontend/errorView.php : view use when a error is catch
  • view/frontend/template.php : base template
  • view/frontend/testView.php : can be delete, at the beginning, your main view
  • index.php : router

How to add a action/page (step by step progress)

  • code the model (in the model folder) and create table in your database if you need them
  • code the controler (controler/front(or back)end folder) to get the data and send them to the view
  • code the view
  • update the router (index.php) to send the good controler

To Do

  • restricte access from folder except public
  • add a autoloader

About

Mini framework MVC with PHP

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages