https://github.com/gnat/ultracore
PHP MVC template for ultra lean Apps & API's.
https://github.com/gnat/ultracore
Last synced: 4 months ago
JSON representation
PHP MVC template for ultra lean Apps & API's.
- Host: GitHub
- URL: https://github.com/gnat/ultracore
- Owner: gnat
- License: mit
- Created: 2016-04-30T05:27:04.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-05-13T22:59:10.000Z (about 9 years ago)
- Last Synced: 2024-12-31T16:50:19.320Z (6 months ago)
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
PHP 7 MVC template for building lean web apps and APIs.
Designed and maintained by Nathaniel Sabanski. Open source under the MIT license.
[](https://travis-ci.org/gnat/ultracore)
## Features
* Automatic URL routing to contollers.
* Add new pages and API endpoints with ease.
* Tiny codebase for easy security audits.
* Autoloader with sub-directory traversal.
* PDO database wrapper.
* Fully commented codebase, with PHPUnit tests.
* Apache or nginx.## Requirements
* PHP 7+.
* Apache 2+ or nginx.## Example Page (http://localhost/example)
Create **system/controllers/Example.class.php** with the following code:
```php
time());
$output = json_encode($output);
$this->View('json');
echo $output;
exit();
}
}
```## Usage Notes
1. Development and production configurations can be set in **/system/config/Config.class.php**
2. Optionally, PHPUnit is used to run the tests.
## If using Apache
Enable **mod_rewrite** and add **AllowOverride All** to your site configuration. This will enable routing using the included .htaccess file.
```
AllowOverride All
```
## If using nginx
Enable routing by creating a location rule set to **index.php** inside your server configuration.
```
location / {
index index.html index.php;
}
```## Keywords
Framework, Model View Controller, PHP 7 Compatible, PHP 7+, router, fast, simple, lean.
## License
This project is licensed under the MIT License. This means you can use and modify it for free in private or commercial projects.