Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/manoj-m-01/php-mvc-boilerplate
PHP MVC boilerplate
https://github.com/manoj-m-01/php-mvc-boilerplate
boilerplate-template mvc oop php php-framework
Last synced: about 1 month ago
JSON representation
PHP MVC boilerplate
- Host: GitHub
- URL: https://github.com/manoj-m-01/php-mvc-boilerplate
- Owner: MANOJ-M-01
- Created: 2022-01-21T08:30:58.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-01-21T08:43:25.000Z (about 3 years ago)
- Last Synced: 2023-07-30T08:22:21.899Z (over 1 year ago)
- Topics: boilerplate-template, mvc, oop, php, php-framework
- Language: PHP
- Homepage:
- Size: 6.84 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Intro
This is a skeleton for Object Oriented PHP(MVC)## How to install
clone this repository then read the `README.md` file. Then create something awasome.## Notes
### 1. use `\` for escape namespace [autoload]
PDO \PDO
PDO::FETCH_ASSOC \PDO::FETCH_ASSOC
DateTime \DateTime
DateTimeZone \DateTimeZone# File structure
config/
---config.php // configuration of database connection and other
controllers/ //recieve req from user
---ProductController // perform operation & get data from model
models/ // get,set data into database
---DB.php //databse connection file
---Products // perform database operation
public/ // where view stored
---index.php //default view# Rules
whenever you use a `controller` include these two files:
require_once __DIR__.'/../config/config.php';
require_once __DIR__.'/../autoload.php';# Referrence links
[PHP trying to use autoload function to find PDO class](https://stackoverflow.com/questions/17909966/php-trying-to-use-autoload-function-to-find-pdo-class/17910005)