CodeTutorial has very nice tutorials about how to build a complete digital goods eshop. Check them out!

eshop with laravel

Tutorial Part 1

In this tutorial series we are going to build a simple but complete digital goods e-shop using Laravel 5.1. The shop will sell only digital articles in a zipped file format, downloadable by the customer once the order and the payment is done. It will be something like ThemeForest or other site where you can buy files.

We will use some of the greatest Laravel feature like Storage and Cashier. The first one, storage, will be used to save our files anywhere and sell it in the shop. Cashier will be used to charge the user credit card once the order is done. We want to simplify the shop process to the max both to maximize our sell and also to maintain this tutorial short enough to be readable by a not expert user.

Like any other shop in the world the first thing we need is a products catalog. In this first part of the tutorial we will see how to build the frontend page with a list of the available products and the backend, where the shop owner can add new products.

Application setup

We assume the application is already created using composer or Laravel command line and its connected to the database. First we will create a layout page and we will use Boostrap CSS and FontAwesome to give our application a bit of style.

In the view folder create a subfolder and name it layouts. Inside this folder create the master.blade.php file and paste the code below into it:

master.blade.phpXHTML

<html>
<head>
    <title>Laravel eshop</title>