slight.mvc / 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.
dev-master
2018-07-17 00:04 UTC
Requires
- php: >=7.1.0
This package is not auto-updated.
Last update: 2024-11-10 06:49:05 UTC
README
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
Or
If you want to build your own structure, just sweat the Composer.
composer require slight.mvc/framework:dev-master
Project Structure (folders)
-
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();
License
Slight is licensed under the MIT license.