E-commerce is a huge business on the web. An integral part of most e-commerce sites is the use of a shopping cart system. This recipe will walk through how to use Laravel sessions to store items for sales and build a shopping cart.
For this recipe, we need a standard installation of Laravel, as well as a properly set up and configured MySQL database.
To complete this recipe, follow these given steps:
CREATE TABLE items ( id int(10) unsigned NOT NULL AUTO_INCREMENT, name varchar(255) DEFAULT NULL, description text, price int(11) DEFAULT NULL, PRIMARY KEY (id) ) ENGINE=InnoDB; INSERT INTO items VALUES ('1', 'Lamp', 'This is a Lamp.','14'); ...