Skip to content

femijoshuaalabi/php-mvc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

php-mvc

This is just a simple PHP Model View Controller (MVC).

  1. Download and exact the file to your project directory.
  2. Open bootstrap folder in the root directory and locate config.php
  3. Configure your database connection and save

P-MVC

The directory is structured with the name MVC
M => Model => Create a file with the name of your new page Example: Creating Model for Home Page

class HomeModel extends Model {

function __construct() {
    parent::__construct();
}

}

V => View => Create a Folder with the name of your new page and create the index file for your view directory Example: Path = Views/Home/index.php Include your page view here

C => Controller => create a file with the name of your new page Example: Creating Controller for Home Page

class Home extends Controller {

function __construct() {
    parent::__construct();
}

public function index(){
    $this->output->page('home/index');
}

} Please Note: This is just a simple MVC works... There are still more to do with it. Thanks... Femi

About

This is basic php mvc

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors