Topic: Integrate MDBootstrap into Laravel

Hennikoe free asked 5 years ago

Hello, I've been reading some videos and blog entries about the implementation of MDBootstrap in Laravel 5.7.

I also looked at the documentation of Laravel but I didn't find it very explanatory for newbies.

So please, could you write me and others who have the question a text and publish sample code on how the best way to import the files from MDBootstrap jQuery Pro into Laravel 5.7 is?

softcon premium answered 3 years ago

There is an easy way to import MDBootstrap in to Laravel, without using additional vendors or and CLI whatsoever.

Simply copy the mdb.min.js and to your public/js folder.Next copy the mdb css files (there should be around 8 of them) to your public/css folder.

Now in the area of your project (I use a head blade include file for this), add the following CSS links:

   <!-- import Font Awesome -->

   <!-- import Material Icons from Google Fonts -->
   <link rel="stylesheet" href="//">

   <!-- import MDB Pro -->
   <link rel="stylesheet" href="/css/mdb.min.css" />

...then just before your closing BODY tag (I use a "foot" blade include), add the following code...

 <!-- import the MDB javascript file -->    
    src="{{ asset('js/mdb.min.js') }}">

...just remember to update the files when new releases occur.

Marcin Luczak staff commented 3 years ago

Hi @softcon,

Thank you for this great explanation :)

Regards, Marcin

Ben Amato free commented 3 years ago

ah very simple and helpfull, thanks

Currently, we don't support Laravel. It's a common question so I hope, one day we'll create a tutorial that would help you to integrate MDB with Laravel

Hennikoe free commented 5 years ago

But I bought MDBootstrap ONLY because I wanted to use it with Laravel. Isn't there a way to include MDBootstrap in laravel?

Bartłomiej Malanowski staff commented 5 years ago

Is there a way, but we've never tried to do that, so we never wrote a tutorial that would help you to do that. However, a lot of customers asks for this so I think I have no choice and I have to write a guide. Could you please tell us what have you tried so far? What exactly are you trying to achieve? Do you just want to import CSS/JS files or use Laravel Mix?

Hennikoe free commented 5 years ago

I just want to import css and js files into laravel 5.7 so I can use the complete MDBootstrap framework to design my website and admin panel properly. I tried in laravel to put the files in the public folder and then via. {{asset:. path }} to grab it.

Bartłomiej Malanowski staff commented 5 years ago

Please check this guide:

arumcomputer free commented 4 years ago

Did you have the time during the last 10 month to just write that guide? I am not getting MBP to work properly with Laravel6. Seems to be an issue with JavaScript.

Please insert min. 20 characters.


Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.



Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.6.1
  • Device: MacBook
  • Browser: Safari
  • OS: Mac
  • Provided sample code: No
  • Provided link: No