Skip to content

ymotse/simple-php-mvc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Simple PHP MVC Project

This is a basic and simple project structure of MVC Design Pattern in PHP using Twig Template Engine, with other functions (Optional), as database connection Oracle (10g or 11g), MySQL (^5.5), MongoDB (^3.6), and authentication with MySQL.

[note] In this project, It's not focusing on front-end, and used only basic components of Bootstrap 4.3.

Requiriments

  • PHP 7.0 or higher
  • Composer Dependency Manager

To work database connections tests

  • PHP Module PDO(mysql and oci)
  • PHP Module mongodb

Application's Structure

  • App
    • controller
    • core
    • model
      • db
      • entity
      • finder
    • view
  • public
    • css
    • fonts
    • img
    • js
  • vendor
    • bin
    • composer
    • mongod
    • symphony
    • twig
    • ...

For authentication with MySQL(inform the correct params in \php-mvc\App\core\config.ini), and follow these commands:

CREATE database yourdbname;

USE yourdbname;

CREATE TABLE users ( id bigint(20) NOT NULL AUTO_INCREMENT, username varchar(30) NOT NULL, password varchar(500) NOT NULL, status bit(1) NOT NULL DEFAULT 1, PRIMARY KEY (id) );

INSERT INTO users (username, password, status) VALUES ('yourusername', 'bcryptedPassword', 1);

(In insert command, You can use Controller Bcryptgenerator on the project to generate a bcryptedPassword, or other Bcrypter on the internet.)
In project root path:
composer update
and then
run project, and go to http://localhost/php-mvc

About

πŸ“šπŸŒŽ Simple PHP MVC

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published