MopaBootstrapBundle

There are a couple bundles that integrate Bootstrap into Symfony projects. MopaBootstrapBundle is one of the popular and stable bundles available. In this section, we will see how to install and configure this bundle in our project.

To process styles, I'm going to use Less. It is a CSS preprocessor that adds loads of functionality to styles. So, before installing MopaBootstrapBundle, make sure that you have familiarized yourself with Less and installed the latest version of it already:

$ npm install -g less

Check your installation via the following command:

$ lessc -v
lessc 2.6.1 (Less Compiler) [JavaScript]

Now install the bootstrap bundle and its dependencies via composer:

//composer.json { "require": { "mopa/bootstrap-bundle": ...

Get Mastering Symfony now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.