2

I'm trying to use Bootstrap-material-design https://github.com/FezVrasta/bootstrap-material-design on the Laravelhttp://laravel-boilerplate.com-boilerplate

Bootstrap-material-design has a npm install, but according to Bootstrap-material-design it's "just" a matter of adding the necessary links to your element for fonts and stylsheets, but Laravel can't find. I've tried this moving manually the .css and .js files:

<link rel="stylesheet" type="text/css" href="{{ URL::asset('css/bootstrap-material-design.css') }}">

In publicfolder I have /css and /js but I always get a 404 error.

Laravel-boilerplate use this config for webpack-mix.js:

const { mix } = require('laravel-mix');
const WebpackRTLPlugin = require('webpack-rtl-plugin');

/*
 |--------------------------------------------------------------------------
 | Mix Asset Management
 |--------------------------------------------------------------------------
 |
 | Mix provides a clean, fluent API for defining some Webpack build steps
 | for your Laravel application. By default, we are compiling the Sass
 | file for the application as well as bundling up all the JS files.
 |
 */

mix.sass('resources/assets/sass/frontend/app.scss', 'public/css/frontend.css')
.sass('resources/assets/sass/backend/app.scss', 'public/css/backend.css')
.js([
    'resources/assets/js/frontend/app.js',
    'resources/assets/js/plugin/sweetalert/sweetalert.min.js',
    'resources/assets/js/plugins.js'
], 'public/js/frontend.js')
.js([
    'resources/assets/js/backend/app.js',
    'resources/assets/js/plugin/sweetalert/sweetalert.min.js',
    'resources/assets/js/plugins.js'
], 'public/js/backend.js')
.webpackConfig({
    plugins: [
        new WebpackRTLPlugin('/css/[name].rtl.css')
    ]
});
pmiranda
  • 7,602
  • 14
  • 72
  • 155

0 Answers0