PHPackages                             siteoffice/silex-rest - 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. [API Development](/categories/api)
4. /
5. siteoffice/silex-rest

ActiveLibrary[API Development](/categories/api)

siteoffice/silex-rest
=====================

A silex skeleton for rest api

05

Since Aug 11Compare

[ Source](https://github.com/sdugene/silex-rest)[ Packagist](https://packagist.org/packages/siteoffice/silex-rest)[ RSS](/packages/siteoffice-silex-rest/feed)WikiDiscussions Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Silex REST
==========

[](#silex-rest)

A simple skeleton application for writing RESTful API.

\####How do I run it? After cloning project, from the root folder of the project, run the following command to install the php dependencies.

```
composer install

```

Set your database then copy resources/config/prod.php to resouces/config/config.php, update with your database params then run.

```
php bin/routesGenerator.php

```

In production environment, authentification key is required, to generate it run the following command.

```
php bin/keyGenerator.php all

```

Your api is now available at .

\####Run tests Some tests were written, and all CRUD operations are fully tested :)

From the root folder run the following command to run tests.

```
vendor/bin/phpunit

```

\####What you will get The api will respond to

```
GET    ->   http://localhost/api/v1/myTable
GET    ->   http://localhost/api/v1/myTable/{id}
POST   ->   http://localhost/api/v1/myTable/search
POST   ->   http://localhost/api/v1/myTable
PUT    ->   http://localhost/api/v1/myTable/{id}
DELETE ->   http://localhost/api/v1/myTable/{id}

```

Your request should have 'Content-Type: application/json' and 'key: myKey' headers. Your api is CORS compliant out of the box, so it's capable of cross-domain communication.

Try with curl:

```
#GET
curl http://localhost/api/v1/myTable -H 'Content-Type: application/json' -H 'key: myKey' -w "\n"
curl http://localhost/api/v1/myTable/1 -H 'Content-Type: application/json' -H 'key: myKey' -w "\n"

#POST (search)
curl -X POST http://localhost/api/v1/myTable/search -d '{"note":"Hello World!"}' -H 'Content-Type: application/json' -H 'key: myKey' -w "\n"

#POST (insert)
curl -X POST http://localhost/api/v1/myTable -d '{"note":"Hello World!"}' -H 'Content-Type: application/json' -H 'key: myKey' -w "\n"

#PUT (update)
curl -X PUT http://localhost/api/v1/myTable/1 -d '{"note":"Uhauuuuuuu!"}' -H 'Content-Type: application/json' -H 'key: myKey' -w "\n"

#DELETE
curl -X DELETE http://localhost/api/v1/myTable/1 -H 'Content-Type: application/json' -H 'key: myKey' -w "\n"

```

Under the resources folder you can find a .htaccess file to put the api in production.

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 71.1% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/45c6d5198442d70b571eeb84185fc3674b344da9194b39e4c4e6c8f20f3b6ee9?d=identicon)[sdugene](/maintainers/sdugene)

---

Top Contributors

[![vesparny](https://avatars.githubusercontent.com/u/82070?v=4)](https://github.com/vesparny "vesparny (27 commits)")[![sdugene](https://avatars.githubusercontent.com/u/12233667?v=4)](https://github.com/sdugene "sdugene (8 commits)")[![davydhaeyer](https://avatars.githubusercontent.com/u/1764033?v=4)](https://github.com/davydhaeyer "davydhaeyer (1 commits)")[![kevich](https://avatars.githubusercontent.com/u/2560726?v=4)](https://github.com/kevich "kevich (1 commits)")[![websoftix](https://avatars.githubusercontent.com/u/479107?v=4)](https://github.com/websoftix "websoftix (1 commits)")

### Embed Badge

![Health badge](/badges/siteoffice-silex-rest/health.svg)

```
[![Health](https://phpackages.com/badges/siteoffice-silex-rest/health.svg)](https://phpackages.com/packages/siteoffice-silex-rest)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35816.3M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24015.5M18](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172437.8k11](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

94452.6k6](/packages/botman-driver-telegram)

PHPackages © 2026

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