PHPackages                             sml/sml-frame - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. sml/sml-frame

ActiveLibrary

sml/sml-frame
=============

A Tiny framework for handling api's the easy way

v0.0.5(9y ago)011MITPHP

Since May 11Pushed 9y ago1 watchersCompare

[ Source](https://github.com/C0mplX/SmlFrame)[ Packagist](https://packagist.org/packages/sml/sml-frame)[ RSS](/packages/sml-sml-frame/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (1)Versions (5)Used By (0)

SmlFrame
========

[](#smlframe)

Getting started
---------------

[](#getting-started)

run composer install edit the .htaccess file to match your file structure

### Basic setup

[](#basic-setup)

```
require_once 'vendor/autoload.php';

$app = new Sml\Sml();

# Run the application
$app->run();
```

### ROUTING with request

[](#routing-with-request)

```
require_once 'vendor/autoload.php';

$app = new Sml\Sml();

$app::get('/', function(){
  echo 'test';
});

# If you want to pass arguments to the function you do this with regEx values
# Supported values are for Strings and Ints

# String and int value

$app::get('/user/(\w+)/(\d+)', function( $string, $int ){

  # You can then use the params here

});

# POST

$app::post('/user', function() use( $app ) {

  # To get the post request you can do:

  # This recives a json encoded body for you, and returns as obj.
  # If you want a array you can pass true into the json( true )
  $app->request()->json();

  # This recives the x-www-form-urlencoded body ( normal POST )
  $app->request()->body();

});

# Run the application
$app->run();
```

### Response

[](#response)

To use the response obj you need yo inject $app onto your functions

```
require_once 'vendor/autoload.php';

$app = new Sml\Sml();

$app::get('/', function() use( $app ){
  $app->response( 200, "it Works" )->send();
});

# You can also send back json_response by chaining the sendJson method onto the response method.
$app::get('/', function() use( $app ){
  $app->response( 200, "it Works" )->sendJson();
});

$app->run();
```

### Changelog

[](#changelog)

version 0.0.2

- Added support for POST, GET, PUT, DELETE routes
- Added exception class for handling errors
- Added Response obj
- Added Request obj
- Added the use of env file

version 0.0.1

- Included simple get Route support.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

4

Last Release

3288d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/64f3fc98ab7ead22e6c0764b966912c07bff9ee04e6fe3e9dcedf8564f87db42?d=identicon)[C0mplX](/maintainers/C0mplX)

---

Top Contributors

[![C0mplX](https://avatars.githubusercontent.com/u/8861576?v=4)](https://github.com/C0mplX "C0mplX (12 commits)")

### Embed Badge

![Health badge](/badges/sml-sml-frame/health.svg)

```
[![Health](https://phpackages.com/badges/sml-sml-frame/health.svg)](https://phpackages.com/packages/sml-sml-frame)
```

###  Alternatives

[laravel/socialite

Laravel wrapper around OAuth 1 &amp; OAuth 2 libraries.

5.7k96.9M674](/packages/laravel-socialite)[laravel/passport

Laravel Passport provides OAuth2 server support to Laravel.

3.4k85.0M532](/packages/laravel-passport)[google/auth

Google Auth Library for PHP

1.4k272.7M162](/packages/google-auth)[kreait/firebase-php

Firebase Admin SDK

2.4k39.7M72](/packages/kreait-firebase-php)[shopify/shopify-api

Shopify API Library for PHP

4634.8M16](/packages/shopify-shopify-api)[thenetworg/oauth2-azure

Azure Active Directory OAuth 2.0 Client Provider for The PHP League OAuth2-Client

2509.6M48](/packages/thenetworg-oauth2-azure)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
