25.06.2018 Views

Full-Stack Vue.js 2 and Laravel 5

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Mock listing<br />

While we're developing, it'd be nice to work with some mock data so that we can<br />

see how our completed page will look. I've included sample/data.<strong>js</strong> in the project<br />

for this very reason. Let's load it in our document, making sure it goes above our<br />

app.<strong>js</strong> file.<br />

index.html: ... ... <br />

<br />

Have a look at the file <strong>and</strong> you'll see that it declares a sample object. We will now<br />

utilize it in our data configuration.<br />

app.<strong>js</strong>: data: { title: sample.title, address: sample.address, about: sample.about }<br />

Once you save <strong>and</strong> refresh, you'll see more realistic data on the page:

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

Saved successfully!

Ooh no, something went wrong!