What is Slim?

Slim is nothing but a PHP based micro framework that helps you swiftly write simple yet elegant web applications and APIs. At its heart, Slim is a dispatcher that gets an HTTP request, induces an appropriate callback routine, and gives back an HTTP response. That is all about SLIM.

Features of SLIM

  • HTTP Router:

    This allows you to map functions or callbacks to various HTTP methods and URLs.

  • Middlewares:

    They simply serve as layers to permit the developers to modify HTTP requests and responses. If you need further clarity on middlewares, then there is an article to read on Scotch that covers everything on Laravel middlewares. Surely, the implementations might be a lot different, but they will definitely offer the same functionality.

  • Dependency Injection:

    It definitely makes it possible for developers to have total control over managing dependencies within various applications.

  • PSR-7 support:

    This is not really defined as a feature, it is more like a standard. It defines the manner in which HTTP requests and responses should be taken care of in web applications. You can study more about it on PHP-FIG article.