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.
You can use an already ready structure that is found here: Sample Project
Or
If you want to build your own structure, just sweat the Composer.
composer require slight.mvc/framework:dev-master
-
src
- config.php
- router.php
-
vendor
- ...
-
view
- index.html
.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
require 'vendor/autoload.php';
Slight\Core::init();
Slight is licensed under the MIT license.