Popularity
0.9
Stable
Activity
0.0
Stable
9
2
1

Description

Liten is a small and simple microframework. Even though it is small, you can still use it to build intelligent and dynamic restful api's.

Code Quality Rank: L3
Programming language: PHP
License: MIT License
Tags: Micro Frameworks     HTTP     API     Framework     REST     Microframework     liten    

Liten alternatives and similar libraries

Based on the "Micro Frameworks" category.
Alternatively, view Liten alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of Liten or a related project?

Add another 'Micro Frameworks' Library

README

Liten

Build Status Latest Stable Version Total Downloads License Join the chat at https://gitter.im/parkerj/Liten

Liten is a small and simple microframework. Even though it is small, you can still use it to build intelligent and dynamic restful api's.

System Requirement

Minimum PHP version 5.4

Features

  • Simple Configuration
  • Static Routes
  • Dynamic Routes
  • Route Subpatterns
  • Group Routing
  • Before Route Middlewares
  • Before Router Middlewares
  • After Router Middlewares
  • HTTP methods and responses

Install

$ composer require liten/liten

Rewrite Rules

.htaccess

RewriteEngine On

# Some hosts may require you to use the `RewriteBase` directive.
# If you need to use the `RewriteBase` directive, it should be the
# absolute physical path to the directory that contains this htaccess file.
#
# RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]

Nginx (root directory)

location / {
    try_files $uri /index.php$is_args$args;
}

Nginx (subdirectory)

location /liten {
    try_files $uri /liten/index.php$is_args$args;
}

Hello World Example

Instantiate a new Liten Application:

$app = new \Liten\Liten();

GET Route:

$app->get('/hello/(\w+)/' function($name) {
    echo "Howdy, $name";
}

Run the new Liten Application

$app->run();

Sample Application

The Liten Blog is a sample application to show what you can do with the Liten Framework.

Documentation & Community

Would love to have your input and help into making Liten a small but yet powerful micro framework. Head on over to the online documentation site to ask questions and or make suggestions.


*Note that all licence references and agreements mentioned in the Liten README section above are relevant to that project's source code only.