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.

Building a Web Service with<br />

<strong>Laravel</strong><br />

In the last chapter, we got the Homestead development environment up <strong>and</strong><br />

running, <strong>and</strong> began serving the main <strong>Vue</strong>bnb project. In this chapter, we will<br />

create a simple web service that will make <strong>Vue</strong>bnb's room listing data ready for<br />

display in the frontend.<br />

Topics covered in this chapter:<br />

Using <strong>Laravel</strong> to create a web service<br />

Writing database migrations <strong>and</strong> seed files<br />

Creating API endpoints to make data publicly accessible<br />

Serving images from <strong>Laravel</strong>

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

Saved successfully!

Ooh no, something went wrong!