Skip to content

ArtiDjeims/LightFrameworkPHP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Light MVC Framework on PHP

This is a light PHP framework that allows you to create a project using MVC model.

This repo contains:

  • assets - Public files such as Css,Js,Img
  • controller - page controllers
  • core - routing and functions
  • model - project models
  • tempaltes - html templates
  • view - views (web pages)
  • index.php - the app
  • .htaccess - routing

Features

  • Model-View-Controller architecture
  • Easily manageable design pattern
  • Light

What is MVC? Click Here to learn more.

Installation

Recommended PHP version is 7.1+

To install this project, simply clone this repo, and you should be good to go!

Preview

Development

Want to contribute or make your own project? Great!

Both Controller and Model folders have sample files inside. Sample file gives you the basic usage template.

To create a model, view or a controller, set the name of the file, to match the next template: nameType.php

Example: modelNameModel.php, controllerNameController.php, viewNameView.php

So if we want to make a /test page on our website, simply create: testModel.php, testController.php, testView.php

Every model declares an app variable:

global $app;
$app = new <modelName>();

Which is being called inside of our controller

$data = $app;

Controller works with our data and generates the page, by passing a view inside of the given template.

Controllers are being called from the route.php file, which is loading a controller based on the URL. Page URL -> Controller Name

License

MIT, Created by Arthur James (Arti_Djeims)

Free Software, Rocks!

About

Light MVC Framework on PHP (Quick Start)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published