[Vuejs]-Installing MDB Vue in Laravel 5.8

0👍

Your have to add your imports in the app.js file.

import 'bootstrap-css-only/css/bootstrap.min.css'; 
import 'mdbvue/build/css/mdb.css'

For me it works without the require('mdbvue'); in the bootstrap.js.

But i think the reason you did´nt get an answer for your question is, there are other problems with the integration of mdbvue into the laravel environment.

For example i have not found a way yet to import fontawesome from my npm-installation folder import '@fortawesome/fontawesome-free/css/all.min.css';.

But when i add <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css"> to my html-head, fontawesome works.

If i find some solutions, i will update this post.

Hope i could help you a bit.

0👍

I had the same issue, I could solved it like this:

  1. Cd into your project
  2. Run: npm install
  3. Run: npm install mdbvue
  4. Add the following code to your ‘resources/js/app.js’ file:

    require(‘./bootstrap’);
    import ‘@fortawesome/fontawesome-free/css/all.min.css’
    import ‘bootstrap-css-only/css/bootstrap.min.css’
    import ‘mdbvue/lib/css/mdb.min.css’

  5. Add the following code to your ‘resources/js/bootstrap.js’ file:

require(‘mdbvue’);

  1. Run: npm run dev

It worked for me, using laravel 5.8.35 and the lastest version of MDVUE.

Leave a comment