npm to add sb-admin-2 to laravel

First of all make sure you have node.js installed. If you haven’t so, install it:

https://nodejs.org/en/

Change directory to your laravel project and use npm to install sb-admin-2 like this:

npm install --global startbootstrap-sb-admin-2

If it compains for popper or other packages, use npm again to install them, like this:

npm install --global popper

Now, the tricky part for most people new to this:

Go to laravel path

resources/sass/app.scss

Add this import:

@import "~startbootstrap-sb-admin-2/scss/sb-admin-2.scss";

Don’t forget to:

npm install 
npm run dev

Now change your app.blade.php with html markup from sb-admin-2, save and refresh your browser: you will end up with sb-admin-2 powerful laravel installation.


Comments

One response to “npm to add sb-admin-2 to laravel”

  1. Try to install without the global option:
    npm install startbootstrap-sb-admin-2
    npm install startbootstrap-sb-admin-2
    npm install && npm run dev

Leave a Reply

Your email address will not be published. Required fields are marked *