Built on the shoulders of giants

As detailed in a previous chapter, it's important not to reinvent the wheel. That's why UserFrosting depends on a number of external libraries, called dependencies. Those are written by people and organizations external to UserFrosting, providing the base that UserFrosting works on. These dependencies are not tied to UserFrosting and can be used by anyone. Think of dependencies as the raw materials, like wood and concrete, you get from the hardware store to build a house. We simply "glued" them together to create awesomeness!

While UserFrosting uses dozens of dependencies, here's a rundown of the most important ones:

Slim 4

Slim is a PHP micro framework that helps you quickly write simple yet powerful web applications and APIs. Slim is the backbone of UserFrosting. To be more precise, UserFrosting is a Slim Application!

Except for the Bakery system (which uses Symfony Console), UserFrosting uses Slim at every level to perform middleware management, route collections, and everything else needed to actually display a web page.


PHP-DI is a dependency injection container. Dependency injection is one of the fundamental pillars of modern object-oriented software design. It is used extensively throughout UserFrosting to glue all services together while maintaining great flexibility to extend the basics functionalities of UserFrosting to create your own project. We'll explain dependency injection in detail in a later chapter. For now, it's only important to note PHP-DI is the dependency manager used by UserFrosting 5 to handle all dependency injection.

Eloquent 8

Eloquent is part of the Laravel Framework. Eloquent makes it enjoyable to interact with a database. When using Eloquent, each database table has a corresponding "Model" that is used to interact with that table. In addition to retrieving records from the database table, Eloquent models allow you to insert, update, and delete records from the table as well.

Eloquent is one of the most powerful and easy to use tools available to interact with a Database. That is why it's been chosen as the database handler since early versions of UserFrosting.

While UserFrosting uses Eloquent, UserFrosting itself isn't a Laravel application (it's actually a Slim one). While most Eloquent documentation and examples apply to UserFrosting, some key functions are different, such as the use of the artisan command UserFrosting doesn't support.

Twig 3

Twig is a flexible, fast, and secure template engine for PHP. Initially developed for the Symfony framework, Twig is easy to use. Twig provides the necessary tools to use the data generated by PHP and render the HTML page the end user gets to see.

Symfony Console 5

Symfony Console eases the creation of beautiful and testable command line interfaces. This is used to power the Bakery command line interface tool used by UserFrosting.

Webpack Encore 4

Webpack Encore wraps Webpack, providing a clean & powerful API for bundling JavaScript modules, pre-processing CSS & JS and compiling and minifying assets. Encore is a professional asset system that's a delight to use. It is used by UserFrosting to serve all CSS and Javascript files, while enabling the use of other frameworks, like Vue.js, in the future.