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": "dev-master", "twbs/bootstrap": "dev-master", "knplabs/knp-paginator-bundle": "dev-master" } } $ sudo composer install
Note
At the time of writing this chapter, the dev-master
version of the preceding packages...