Git Product home page Git Product logo

crud-basico-php's Introduction

CRUD MVC OOP PDO

A simple and intuitive CRUD system using the MVC pattern in OOP paradigm. To connect to the database using PDO.

crud mvc oop pdo

STRUCTURE

├── app
│   ├── controllers
|   |   ├── MainController.php
|   |   ├── PostsController.php
|   |   └── UsersController.php
│   ├── models
|   |   ├── PostsModel.php
|   |   └── UsersModel.php
|   └── views
|       ├── posts
|       │   ├── add.php
|       │   ├── edit.php
|       │   ├── post.php
|       |   └── posts.php
|       ├── users
|       │   ├── edit.php
|       │   ├── panel.php
|       │   ├── sign-in.php
|       │   ├── sign-up.php
|       │   ├── user.php
|       |   └── users.php
|       ├── footer.php
|       ├── header.php
|       └── pagination.php
├── core
│   ├── classes
|   │   ├── Controller.php
|   |   ├── Model.php
|   |   ├── Sql.php
|   |   └── ValidationException.php
│   ├── config
|   │   ├── database.php
|   |   └── session.php
│   ├── helpers
|   │   ├── Email.php
|   │   ├── Errors.php
|   │   ├── File.php
|   │   ├── Site.php
|   │   ├── Str.php
|   │   ├── Time.php
|   |   └── User.php
|   └── App.php
├── public
│   ├── assets
│   │   ├── css
│   │   │   └── style.css
│   |   └── js
│   │       └── main.js
│   └── uploads
│       └── .empty
├── .htaccess
├── LICENSE
├── README.md
├── database.sql
├── error.log
├── index.php
├── install.php
├── screenshot.png
└── version.json

REQUIREMENTS

System requirements

  • Apache.
  • PHP 7.2.0 or higher.

PHP extensions

Database

CONFIG

Database

$this->config['db'] = array(
	'driver'   => 'mysql',
	'host'     => 'localhost',
	'username' => 'root',
	'password' => '',
	'name'     => 'crud-mvc-oop-pdo'
);

Session

$this->config['session-name'] = 'SID';

DATABASE

Posts

Field Type Null Key Default Extra
post_id INT(11) NO PRI NULL AUTO_INCREMENT
post_created DATETIME NO CURRENT_TIMESTAMP
post_updated DATETIME NO CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
post_title VARCHAR(255) NO NULL
post_author INT(11) NO NULL
post_content TEXT NO NULL
post_cover VARCHAR(255) NO NULL

Users

Field Type Null Key Default Extra
user_id INT(11) NO PRI NULL AUTO_INCREMENT
user_created DATETIME NO CURRENT_TIMESTAMP
user_updated DATETIME NO CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
user_name VARCHAR(255) NO NULL
user_email VARCHAR(255) NO NULL
user_password VARCHAR(255) NO NULL
user_role VARCHAR(20) NO NULL

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.