PHPackages                             lanos/api-framework - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. lanos/api-framework

ActiveProject[HTTP &amp; Networking](/categories/http)

lanos/api-framework
===================

A framework for RESTFul Services, built upon Slim, utilizing Eloquent ORM and oAuth 2.0

1.0.1(7y ago)034MITPHPPHP &gt;=5.5.0

Since Feb 6Pushed 7y agoCompare

[ Source](https://github.com/syn6UK/lanosREST)[ Packagist](https://packagist.org/packages/lanos/api-framework)[ Docs](http://github.com/syn6uk/lanosAPI)[ RSS](/packages/lanos-api-framework/feed)WikiDiscussions master Synced 2w ago

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

Lanos 1.0 API Framework
=======================

[](#lanos-10-api-framework)

Planning to build a SaaS package? Need to deploy a secure API for an idea you have and need to do it quickly.

### Look No Further!

[](#look-no-further)

This framework was designed to deploy quickly and easily. And has been used on all projects by NuLead and Lanos.

### What's Included?

[](#whats-included)

- Eloquent Object Relationship Mapping
- oAuth 2.0, password and client\_credentials flows.
- Easy Dependancy Injection
- Easy Auth Guard / Middleware Configuration
- Resource Owner Middleware protection
- Pre-configured for CORS.

COMING SOON
===========

[](#coming-soon)

```
An azure container image for this framework!

```

Installation
------------

[](#installation)

```
php composer.phar create-project lanos/api-framework [my-app-name]

```

Replace `[my-app-name]` with the desired directory name for your new application. You'll want to:

- Point your virtual host document root to your new application's `public/` directory.
- Ensure `logs/` is web writeable.

### Database Creation

[](#database-creation)

You need to create a database, ensure the app has access and configure it in src/settings.php.

Then inside that database create the following schema.

```
CREATE TABLE IF NOT EXISTS `oauth_access_tokens` (
  `access_token` varchar(40) NOT NULL,
  `client_id` varchar(80) NOT NULL,
  `user_id` varchar(80) DEFAULT NULL,
  `expires` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `scope` varchar(4000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `oauth_authorization_codes` (
  `authorization_code` varchar(40) NOT NULL,
  `client_id` varchar(80) NOT NULL,
  `user_id` varchar(80) DEFAULT NULL,
  `redirect_uri` varchar(2000) DEFAULT NULL,
  `expires` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `scope` varchar(4000) DEFAULT NULL,
  `id_token` varchar(1000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `oauth_clients` (
  `client_id` varchar(80) NOT NULL,
  `client_secret` varchar(80) DEFAULT NULL,
  `redirect_uri` varchar(2000) DEFAULT NULL,
  `grant_types` varchar(80) DEFAULT NULL,
  `scope` varchar(4000) DEFAULT NULL,
  `user_id` varchar(80) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

INSERT INTO `oauth_clients` (`client_id`, `client_secret`, `redirect_uri`, `grant_types`, `scope`, `user_id`) VALUES
('lanosTest', '098f6bcd4621d373cade4e832627b4f6', NULL, 'password client_credentials', 'user_read user_write', NULL);

CREATE TABLE IF NOT EXISTS `oauth_jwt` (
  `client_id` varchar(80) NOT NULL,
  `subject` varchar(80) DEFAULT NULL,
  `public_key` varchar(2000) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `oauth_refresh_tokens` (
  `refresh_token` varchar(40) NOT NULL,
  `client_id` varchar(80) NOT NULL,
  `user_id` varchar(80) DEFAULT NULL,
  `expires` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `scope` varchar(4000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `oauth_scopes` (
  `scope` varchar(80) NOT NULL,
  `is_default` tinyint(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `oauth_users` (
  `username` varchar(80) NOT NULL DEFAULT '',
  `password` varchar(80) DEFAULT NULL,
  `first_name` varchar(80) DEFAULT NULL,
  `last_name` varchar(80) DEFAULT NULL,
  `email` varchar(80) DEFAULT NULL,
  `email_verified` tinyint(1) DEFAULT NULL,
  `scope` varchar(4000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

INSERT INTO `oauth_users` (`username`, `password`, `first_name`, `last_name`, `email`, `email_verified`, `scope`) VALUES
('test', '$2y$10$U3CMYLB/2xV3xI6lv3Kmfek.R.N.DD1GrFhv4PciknQ15Tcf889nu', 'robert', 'lane', 'test@test.com', 1, 'user_read user_write');

ALTER TABLE `oauth_access_tokens`
ADD PRIMARY KEY (`access_token`);

ALTER TABLE `oauth_authorization_codes`
ADD PRIMARY KEY (`authorization_code`);

ALTER TABLE `oauth_clients`
ADD PRIMARY KEY (`client_id`);

ALTER TABLE `oauth_refresh_tokens`
ADD PRIMARY KEY (`refresh_token`);

ALTER TABLE `oauth_scopes`
ADD PRIMARY KEY (`scope`);

ALTER TABLE `oauth_users`
ADD PRIMARY KEY (`username`);

```

### Running The Application

[](#running-the-application)

To run the application in development, you can run these commands

```
cd [my-app-name]
php composer.phar start

```

Run this command in the application directory to run the test suite

```
php composer.phar test

```

That's it! Now go build something cool.

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

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 ~0 days

Total

2

Last Release

2700d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/31861108?v=4)[Rob](/maintainers/l4nos)[@l4nos](https://github.com/l4nos)

---

Tags

apirestrouterpsr7microframeworklanos

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/lanos-api-framework/health.svg)

```
[![Health](https://phpackages.com/badges/lanos-api-framework/health.svg)](https://phpackages.com/packages/lanos-api-framework)
```

PHPackages © 2026

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