PHPackages                             vikkio88/slime-api - 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. vikkio88/slime-api

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

vikkio88/slime-api
==================

a simple RestFul API framework based on Slim v3

v0.2(9y ago)7422MITPHP

Since Nov 5Pushed 9y ago1 watchersCompare

[ Source](https://github.com/vikkio88/slime)[ Packagist](https://packagist.org/packages/vikkio88/slime-api)[ RSS](/packages/vikkio88-slime-api/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (5)Versions (3)Used By (0)

Slime (SLIM + Eloquent)
=======================

[](#slime-slim--eloquent)

[![Build Status](https://camo.githubusercontent.com/d7c6a35ac68c34d758c2e8780248f8a1636e3ec1d187c15ae297e26c36b95f14/68747470733a2f2f7472617669732d63692e6f72672f76696b6b696f38382f736c696d652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/vikkio88/slime) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/36a426f90dcd54bcccdddbca3220622c2187e048078bdfd7e144f628c5e41730/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f76696b6b696f38382f736c696d652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/vikkio88/slime/?branch=master) [![Code Climate](https://camo.githubusercontent.com/917c7cb299f1f09ca1d7c71492baf134bb750ae7db9cbd63cb7d0e19a70cb0eb/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f76696b6b696f38382f736c696d652f6261646765732f6770612e737667)](https://codeclimate.com/github/vikkio88/slime) [![Test Coverage](https://camo.githubusercontent.com/3bc8d2a00f73e61735d9dde5c37065857acf6f46ed877406df458c950e2eb557/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f76696b6b696f38382f736c696d652f6261646765732f636f7665726167652e737667)](https://codeclimate.com/github/vikkio88/slime/coverage) [![Issue Count](https://camo.githubusercontent.com/fccf0f030ce7e9ce4f8fa1882fa4eeb8dce1187625dad0d906e8f9387e86308a/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f76696b6b696f38382f736c696d652f6261646765732f69737375655f636f756e742e737667)](https://codeclimate.com/github/vikkio88/slime)

Laravel is as heavy as a pregnant morbidly obese hippo and full of things that you would never use but you like eloquent models?

Well use **slime-api** for fuck sake.

Basically a boilerplate to create quickly RestFulAPI.

### Ingredients

[](#ingredients)

**Aqua, Eloquent (from Laravel), Slim (v3), Some other bullshit**

**Beware, it might contain nuts**

HowTo
=====

[](#howto)

First clone the project

```
git clone git@github.com:vikkio88/slime.git

```

or install with composer

```
composer create-project vikkio88/slime-api WHATEVER

```

Install the dependencies (not needed if you used `create-project` command above)

```
composer install

```

Move and edit the configuration from the file `.env.example` to the file `.env`

Run the migrations and seeders

```
php novice migrate && php novice seeder

```

Run the tests

```
phpunit

```

Novice
======

[](#novice)

`novice` is a php cli script taken from another [project](https://github.com/kladd/slim-eloquent). In this small project I extended it to make it easier for everyone to generate classes and even generate their own commands.

How to
------

[](#how-to)

**Novice** will run a script which is in the right place, if it extends the right Interface. The file `config/console` contains the path where novice will search for the scripts

```
return [
    'commandPaths' => [
        'App\Lib\Slime\Console\Commands\\',
        'App\Console\\'
    ]
];
```

If you need more, just add more (dont forget to add them to the composer json autoloader config)

Usage
-----

[](#usage)

To run a `novice` command you will need to be in the root of the project and type

```
$ php novice

```

### Command Bundled

[](#command-bundled)

Out of the box **Slime** provide you the following *novice* commands:

```
create_config
create_migration
create_model  (namespaces availabile)
create_action  (namespaces availabile)
create_seeder
create_route
migrate
seed
build

```

which code can be found on `App\Lib\Slime\Console\Commands`

and

```
coverage [percentage]
echo [parameter1] [parameter2] ...

```

which code can be found on `App\Console`

#### Build Command

[](#build-command)

Running the command `php novice build` you will generate a lighter version of your api project (easier to deploy via ftp) in the `dist/` folder.

```
php novice build

```

Will generate the deployable version, if you want it to be execute with verbose output just add **-v**

```
php novice build clean

```

will clean the `dist/` folder.

There is one configuration file that will allow you to customize your build `config/build.php`You can add to this file the folders and the files you want the build script to copy over, and if you want to exclude more files on the vendor clean process.

#### Namespaced Generator Commands

[](#namespaced-generator-commands)

```
php novice create_model users\\player

```

Will generate a Model inside the right folder, creating the namespace structure (psr4 standard) and the namespace string on the file head. the command above will generate `Models/Users/Player.php` file and the class will be in the namespace `App\Models\Users`.

```
php novice create_action users\\player_get_one

```

Will generate an Action inside the right folder, creating the namespace structure (psr4 standard) and the namespace string on the file head. the command above will generate `Actions/Users/PlayerGetOne.php` file and the class will be in the namespace `App\Actions\Users`.

All the Generator commands convert snake\_case into UpperCamelCase, so if you type

```
php novice create_model users\\player_match

```

the command above will generate `Models/Users/PlayerMatch.php` file and the class will be in the namespace `App\Models\Users`.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity54

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

Total

2

Last Release

3385d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4b2ad137676a697a1f32c643900a319716944fa16b936026d22ef25e5ac10e22?d=identicon)[vikkio88](/maintainers/vikkio88)

---

Top Contributors

[![vikkio88](https://avatars.githubusercontent.com/u/248805?v=4)](https://github.com/vikkio88 "vikkio88 (66 commits)")

---

Tags

apiclieloquentframeworklumen-alternativemicro-frameworkmigrationsphp-rest-apirest-apirestfulslim3resteloquentMicroservicevikkio88slime-backend

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/vikkio88-slime-api/health.svg)

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

###  Alternatives

[maurobonfietti/rest-api-slim-php

Example of REST API with Slim PHP Framework.

3061.7k](/packages/maurobonfietti-rest-api-slim-php)[bjerke/api-query-builder

A query builder for Laravel that parses the request and uses Eloquent ORM to query database

267.7k1](/packages/bjerke-api-query-builder)[bjerke/laravel-bread

A boilerplate package for BREAD operations through REST API in Laravel

115.2k](/packages/bjerke-laravel-bread)[megaads/apify

A pretty library to help developers build RESTful APIs lightly, quickly and properly even without writing code

151.7k](/packages/megaads-apify)[gointegro/hateoas

GOintegro HATEOAS Lib

408.0k1](/packages/gointegro-hateoas)[phrest/api

REST API Package for Phalcon PHP

304.2k](/packages/phrest-api)

PHPackages © 2026

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