25.06.2018 Views

Full-Stack Vue.js 2 and Laravel 5

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CSS<br />

To migrate CSS, we'll copy style.css from the prototype into the <strong>Laravel</strong> project.<br />

The default <strong>Laravel</strong> frontend app used Sass rather than CSS, so we'll need to<br />

make a directory for CSS assets first: $ mkdir ./resources/assets/css $ cp<br />

../vuebnb-prototype/style.css ./resources/assets/css/<br />

Let's then make a new declaration in our Mix config to get a CSS bundle using<br />

the styles method.<br />

webpack.mix.<strong>js</strong>: mix .<strong>js</strong>('resources/assets/<strong>js</strong>/app.<strong>js</strong>', 'public/<strong>js</strong>')<br />

.styles('resources/assets/css/style.css', 'public/css/style.css') ;<br />

We'll now link to the CSS bundle in our view by updating the link's href.<br />

resources/views/app.blade.php:

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!