03.12.2015 Views

laravel4cookbook

Create successful ePaper yourself

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

Embedded Systems 288<br />

1 "require" : {<br />

2 "laravel/framework" : "4.0.*",<br />

3 "cboden/Ratchet" : "0.3.*"<br />

4 },<br />

.<br />

This was extracted from composer.json.<br />

Follow that up with:<br />

1 composer update<br />

.<br />

Ratchet isn’t built specifically for Laravel 4, so there are no service providers for us to add.<br />

We’ll now have access to the Ratchet library for client-server communication, Bootstrap for styling<br />

the interface and jQuery for connecting these two things together.<br />

Note About Errata<br />

I love all things Arduino and Raspberry Pi. When I’m not programming; I’m trying to build things<br />

(in the real world) which can interact with my programming. Don’t let that fool you though: I am<br />

not an expert in electronics. There are bound to be better ways to do all of this stuff.<br />

If you can’t get a specific program installed because apt or permissions or network settings or aliens; I<br />

cannot help you. I have neither the time nor the experience to guide you through the many potential<br />

problems. Hit me up on Twitter and, if I have not yet already done so, I will connect you to a forum<br />

where you can discuss this with other (smarter) people.<br />

Creating An Interface<br />

The first step to creating an interface is returning static HTML for a web request. We handle this by<br />

creating a route, a controller and a view:

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

Saved successfully!

Ooh no, something went wrong!