Sei sulla pagina 1di 5

11/6/2015

ALaravelwebshop|murze.be

MURZE.BE
Some geeky stuff I stumble upon

SHOW MENU

A Laravel webshop
DECEMBER 12, 2014

Earlier todaySpatie, the company where I work, launched a webshop

polkadots.be.
When the project started one of the first choices that we had to make was if we
were going to use an existing solution orbuild our own custom solution. For this
project we took an extensive look at some existingsolutions. Allthough the existing
webshop systemsare very powerful, we wanted to use something less bloated. At
Spatie were big fans ofsimple, clean and elegant solutions.To makea long story
short we made the decision to build a shop ourselves.
Polkadots.be aims to be a very speedy application, thats simple to use. Customers
can buy products without having to make a user profile. Shop ownersare presented
a very clean interface to administer their shop.
On the clientside Rogierand Willem made a beautifuldesign for the shop. The
variousproductlists you see on the site are rendered with Angular.Because all
filtering is done by the browseryoull never see loading-indicator on those pages.
Your filter settings are stored inthe local storage of your browser.
The serverside of the shopis built with Laravel 4.2 and leverages techniques such
https://murze.be/2014/12/alaravelwebshop/

1/5

11/6/2015

ALaravelwebshop|murze.be

as repositories, domain events, presenters, factories, Using these design


patterns makes the code more readable and self-documenting. Ultimately it leads
to a flexible codebase that can be easily adapted to future business requirements.
Of course we didnt build everything from the ground up, many freely available
packages were used. Ill highlight some of them:

baum/baum: an implementation of the nested set pattern. Its being used to


store the hierarchical relation between productcategories.

davejamesmiller/laravel-breadcrumbs: offers a clean way to


generatebreadcrumbs.

gloudemans/shoppingcart: the basis for the cart. We built some methods on


top of it so it can also store order options (such as delivery method) .

dyaa/pushover: used to send push notifications to the mobile device of the


shop administrator. In case of polkadots theshop admin gets
immediatelynotified of new orders or when a stock shortage is imminent.

vespakoen/menu: generates all menus you see on the site.


indatus/dispatcher:allows for the scheduling of artisan commands with the
command itself so you dont have to modify a crontab.

laracasts/commander: enables us to use domain events.


imagine/imagine: used to convert the productimages to the right size.
michelf/php-markdown: converts the markdown that stored in the external
product system of our client to html on de product pages.

league/flysystem: offers filesystem abstraction. Is used to retrieve images


from the ftp-server of our client.

cviebrock/eloquent-sluggable: generates slugs for eloquent models.


itsgoingd/clockwork: used extensively to track down and solve n+1 issues.
spatie/payment: allows for payments to made. Take a look atthe code of
https://murze.be/2014/12/alaravelwebshop/

2/5

11/6/2015

ALaravelwebshop|murze.be

the offical Europabank plugin to understand why we madea payment


solution ourselves. Id rather [insert something very unpleasant here]than
using the officialcode.
Lets take a look at the used infrastructure. The application is hosted on a Forgeprovisioned Digital Ocean server. Tocache some expensive queries we use

Memcached. Mandrill is used to deliver all mails. All push notifications are being
sentby Pushover.net. All communication with external systems is being done in

Beanstalkd queues. We monitor the server with New Relic. The site uses the
SPDY protocol instead of regular http.
I believe our team did terrific job. Take a look at the shop and judge for yourself. If
you have any remarks or questionslet me know.

Tags: laravel, php, spatie, webshop

Nginx HTTP server boilerplate configs

6Comments

Marking http as non secure

murze.be

Share

Recommend

Login

SortbyBest

Jointhediscussion
AdformDonatasStirbys 2monthsago

Guys,youcouldopensourcethis.Itwouldbeagifttotheworld.
1

Reply Share

billyct 21daysago

amazing!&greatjob!&thankyou!&awesomework!
https://murze.be/2014/12/alaravelwebshop/

3/5

11/6/2015

ALaravelwebshop|murze.be

amazing!&greatjob!&thankyou!&awesomework!

Reply Share

AmedoraAhmed 3monthsago

Amazing!

Reply Share

michalgallovic 3monthsago

Greatjob!

Reply Share

Ouziek 4monthsago

inspiring,thankyou!

Reply Share

emini 5monthsago

Thanksforsharing!AwesomeWork!

Reply Share

WHAT'STHIS?

ALSOONMURZE.BE

UseBackupPCtocreatedailybackups

Generateimagemanipulationsina
Laravelproject

2comments4monthsago

AvatarFreekVanderHertenNiceofyoutoletme
know.I'veupdatedthelink.

1comment5monthsago

UsingElasticsearchinLaravel

ALaravelpackagetoretrieveGoogle
Analyticsdata

1comment5monthsago

AvatarOliI'msuperlookingforwardtogivingita
go,namelytostartusingitwithEloquent!

Subscribe

AddDisqustoyoursite

AvatarLloopleThisisagreatpackage,andI
wanttouseitinmyprojects,butI'mstuck
rightnow.Iwanttobeableto

7comments3monthsago

AvatarJuukie14Awesome!Thanksforsharing!

Privacy

ARCHIVES

Archives SelectMonth

UP
https://murze.be/2014/12/alaravelwebshop/

4/5

11/6/2015

https://murze.be/2014/12/alaravelwebshop/

ALaravelwebshop|murze.be

5/5

Potrebbero piacerti anche