Slim PHP Micro-Framework for building a REST API


SensioLabsInsight Scrutinizer Code Quality

This is an app skeleton for the Slim PHP Micro-Framework to get started quickly building a REST API



$ composer create-project awurth/slim-rest-base [app-name]


Create database tables

$ php bin/console db

Create users

$ php bin/console user:create

Use --admin option to set the user as admin

Dump routes

Execute the following command at the project root to print all routes in your terminal

$ php bin/console routes

Use --markdown or -m option to display routes in markdown format

$ php bin/console routes -m >

If you're using Oh My Zsh, you can install the symfony2 plugin, which provides an alias and autocompletion:

# Without Symfony2 plugin
$ php bin/console db

# With Symfony2 plugin
$ sf db


  • PHPUnit