https://github.com/mehah/slight
Framework REST for PHP
https://github.com/mehah/slight
api authentication framework framework-php light mvc php php-framework php-library rest restful router validation
Last synced: 7 months ago
JSON representation
Framework REST for PHP
- Host: GitHub
- URL: https://github.com/mehah/slight
- Owner: mehah
- License: mit
- Created: 2018-06-20T15:30:18.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-07-17T00:05:00.000Z (over 7 years ago)
- Last Synced: 2024-05-02T01:11:27.124Z (over 1 year ago)
- Topics: api, authentication, framework, framework-php, light, mvc, php, php-framework, php-library, rest, restful, router, validation
- Language: PHP
- Homepage:
- Size: 51.8 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Slight Framework
Slight is an MVC framework that will assist you in the development of rest applications, containing tools for routing, authentication and validation for data models.
## Installation
You can use an already ready structure that is found here: **[Sample Project](https://github.com/mehah/Slight-project)**
Or
If you want to build your own structure, just sweat the [Composer](https://getcomposer.org/).
```shell
composer require slight.mvc/framework:dev-master
```
#### Project Structure (folders)
+ src
* config.php
* router.php
+ vendor
+ ...
+ view
* index.html
.htaccess
```.htaccess
RewriteEngine On
RewriteCond %{REQUEST_URI} ^((?!\.).)*$ [NC]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?$url=$1 [QSA,L]
RewriteEngine On
RewriteCond %{REQUEST_URI} \.*$
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ view/$1 [QSA,L]
RewriteEngine on
RewriteCond %{REQUEST_URI} (/src/|/vendor/|/build/)
RewriteRule ^.*$ /404 [L]
```
index.php
```php
License
-------
Slight is licensed under the MIT license.