Skip to content

notarun/todo-php-mvc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wrote this a while back to learn PHP and MVC, uploading here just for the backup. ⚠️ Not for productionn use.

TODO MVC Project

A simple todo application build with MVC pattern and written in PHP.

Requirements

  • PHP 7.4
  • MySQL 5.7
  • Composer

Setup

git clone https://github.com/notarun/todo-php-mvc
cd todo-php-mvc
composer install                    # setup vendor folder for autoloading
cp config.example.php config.php    # create config file
vim config.php                      # edit config file
mysql -u root < schema.sql          # import the schema file
composer start                      # start the dev server (localhost:8080)

Project Structure

  • Routes are defined in src/routes.php.
  • Dependency containers are defined in src/containers.php.
  • Validators are defined in src/validators.php.
  • Views are inside src/views/ directory.
  • Controllers are inside src/app/Controllers/ directory.
  • Models are inside src/app/Models/ directory.
  • Middlewares can be created inside src/app/Middlewares/ directory.

About

MVC framework built with PHP.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published