Skip to content

fredtux/php-mvc-skeleton

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple MVC skeleton for PHP development

Just use docker-compose up and you're ready to code

Example

In order to understand how the autoload works, just follow the example for the main page, it goes through all the required steps.

Naming

Use the namespace myproject or change it to your own.

Files will be named using this convention:

  1. Controller -> NameCotroller
  2. Model -> NameModel
  3. View -> NameView

The view will load a page from public/html

Paths

All paths are defined in config.php

Docker

In order to better understand the docker code, look at this repository https://github.com/fredtux/sitepoint-docker-tutorial