Coder Social home page Coder Social logo

simple-php-mvc's Introduction

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

simple-php-mvc's People

Contributors

ymotse avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.