Skip to content

Latest commit

 

History

History
66 lines (48 loc) · 1.29 KB

README.md

File metadata and controls

66 lines (48 loc) · 1.29 KB

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

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.