03.12.2015 Views

laravel4cookbook

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

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

E-Commerce<br />

One of the benchmarks of any framework is how well it fares in the creation of an e-commerce<br />

application. Laravel 4 is up to the challenge; and, in this chapter, we’re going to create an online<br />

shop.<br />

.<br />

The code for this chapter can be found at: https://github.com/formativ/tutorial-laravel-4-ecommerce.<br />

Note on Sanity<br />

There is no way that an e-commerce platform, built in 40 minutes, can be production-ready. Please<br />

do not attempt to conduct any real business on the basis of this chapter; without having taken the<br />

necessary precautions.<br />

This chapter is a guide, an introduction, a learning tool. It is not meant to be the last word in building<br />

e-commerce platforms. I do not want to hear about how all your customers want to sue you because<br />

you slapped your name and logo on the GitHub source-code and left all reason behind.<br />

Getting Started<br />

In this chapter; we will create a number of database objects, which will later be made available<br />

through API endpoints. We’ll then use these, together with AngularJS, to create an online shop.<br />

We’ll finish things off with an overview of creating PDF documents dynamically.<br />

.<br />

You need to understand a bit of JavaScript for this chapter. There’s too much functionality to also<br />

cover the basics, so you should learn them elsewhere.<br />

Installing Laravel 4<br />

Laravel 4 uses Composer to manage its dependencies. You can install Composer by following the<br />

instructions at http://getcomposer.org/doc/00-intro.md#installation-nix.

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

Saved successfully!

Ooh no, something went wrong!