如何使用我的标准Laravel项目正确设置MDBootstrap

I am in the process of learning how to use Laravel and I am interested in styling my web pages using MDBootstrap. However, I am confused about how to integrate it into my project correctly. I do not want to link it using CDN, instead I would like to install it into my project.

Can someone show me the necessary steps to achieve this in a basic Laravel project?

Laravel comes with 2 frontend package managers: npm and yarn

npm

npm i mdbootstrap

yarn

yarn add mdbootstrap

After this your package is located in the node_modules directory.

You can import sass files and let the js be combined from packages to vendor.js.

You can configure what gets transpiled to where using webpack.mix.js

Running npm run dev will start the transpiling.


If you want to install mdbootstrap pro, you should follow these steps

  1. get a license and mail contact@mdbootstrap.com requesting access to their git repo (as they have not automated this)
  2. generate an access token on gitlab
  3. run

    npm install git+https://oauth2:[TOKEN]@git.mdbootstrap.com/mdb/[REPO].git --save
    

    Where [TOKEN] is your token from step 2 and [REPO] is the one you need from the choices jquery, angular, vue or react. You can find the exact urls by visiting git.mdbootstrap.com and choosing the right project. In the top right corner find the clone button and copy the https link.